remove old loop syntax

This commit is contained in:
Robert Kaussow 2019-08-27 22:22:41 +02:00
parent d66a92234b
commit 725f7de02f
2 changed files with 14 additions and 1 deletions

View File

@ -4,8 +4,21 @@ network_fqdn: localdomain
network_defaultif: eth0
network_disable_ipv6: False
network_dns_server: 8.8.8.8
network_interfaces: {}
## Example:
# network_interfaces:
# eth0:
# bootproto: none
# onboot: yes
# hwaddr: "aa:bb:cc:dd:ee"
# ipaddr: 192.168.0.5
# prefix: 26
# gateway: "192.168.0.1"
# userctl: no
network_hosts_entries: []
## Example:
# network_hosts_entries:
# - hostname: myhost
# fqdn: myhost.rknet.org

View File

@ -27,7 +27,7 @@
owner: root
group: root
mode: 0644
with_dict: "{{ network_interfaces }}"
loop: "{{ network_interfaces | dict2items }}"
loop_control:
label: "{{ item.key }}"
when: item.key in ansible_interfaces or item.key.split(":")[0] in ansible_interfaces