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

View File

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