change variable layout
This commit is contained in:
parent
35414f0fed
commit
f79e647b61
@ -1,4 +1,7 @@
|
|||||||
---
|
---
|
||||||
def_network:
|
network_hostname: ''
|
||||||
disable_ipv6: false
|
network_fqdn: ''
|
||||||
network: {}
|
network_defaultif: ''
|
||||||
|
network_disable_ipv6: false
|
||||||
|
|
||||||
|
network_interfaces: {}
|
||||||
|
@ -1,35 +1,34 @@
|
|||||||
---
|
---
|
||||||
- name: set hostname
|
- name: set hostname
|
||||||
template:
|
template:
|
||||||
src: 'etc/hostname.j2'
|
src: 'etc/hostname.j2'
|
||||||
dest: '/etc/hostname'
|
dest: '/etc/hostname'
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
register: hostname_result
|
register: hostname_result
|
||||||
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'
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
register: hosts_result
|
register: hosts_result
|
||||||
notify:
|
notify:
|
||||||
- host_reboot
|
- host_reboot
|
||||||
|
|
||||||
- name: interface configuration
|
- name: 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 }}'
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
with_dict: '{{ network.config }}'
|
with_dict: '{{ network_interfaces }}'
|
||||||
when: item.key in ansible_interfaces
|
when: item.key in ansible_interfaces
|
||||||
notify:
|
notify:
|
||||||
- network_restart
|
- network_restart
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user