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
parent
1973378e75
commit
3169278429
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue