small refactoring

This commit is contained in:
Robert Kaussow 2017-12-10 17:11:05 +01:00
parent b7e848d174
commit 4e6e20ef44
2 changed files with 7 additions and 7 deletions

View File

@ -1,5 +1,5 @@
---
- name: restart network
- name: Restart network
shell: sleep 2 && systemctl restart network
async: 1
poll: 0
@ -8,7 +8,7 @@
listen:
- "network_restart"
- name: reboot server
- name: Reboot server
shell: sleep 2 && shutdown -r now "Reboot triggered by Ansible"
async: 1
poll: 0
@ -17,7 +17,7 @@
listen:
- "host_reboot"
- name: wait for host
- name: Wait for host
local_action:
module: wait_for
host={{ network_interfaces[network_defaultif].ipaddr }}

View File

@ -1,5 +1,5 @@
---
- name: set hostname
- name: Set hostname
template:
src: 'etc/hostname.j2'
dest: '/etc/hostname'
@ -10,7 +10,7 @@
notify:
- host_reboot
- name: set hosts file
- name: Set hosts file
template:
src: 'etc/hosts.j2'
dest: '/etc/hosts'
@ -21,7 +21,7 @@
notify:
- host_reboot
- name: interface configuration
- name: Add network interface configuration
template:
src: 'etc/sysconfig/network-scrips/ifcfg.j2'
dest: '/etc/sysconfig/network-scripts/ifcfg-{{ item.key }}'
@ -35,7 +35,7 @@
notify:
- network_restart
- name: set dns server
- name: Set dns server
template:
src: 'etc/resolv.conf.j2'
dest: '/etc/resolv.conf'