roles/rhel-network: Enable/start service

The *networking* service, which is actually a legacy init script, is
provided by the *initscripts* package on RHEL and its derivatives. This
service needs to be running in order for the configuration generated by
the *rhel-network* role to be applied to the managed node.
jenkins-master
Dustin 2018-03-23 10:09:47 -05:00
parent 1973378e75
commit 3169278429
1 changed files with 17 additions and 0 deletions

View File

@ -1,3 +1,10 @@
- name: ensure initscripts package is installed
package:
name=initscripts
state=present
tags:
- install
- name: ensure network devices are configured
template:
src=ifcfg.j2
@ -11,3 +18,13 @@
path=/etc/sysconfig/network-scripts/ifcfg-{{ item }}
state=absent
with_items: '{{ network.ignore_interfaces|d(()) }}'
- name: ensure network starts at boot
service:
name=network
enabled=yes
- meta: flush_handlers
- name: ensure network is started
service:
name=network
state=started