use loop control

This commit is contained in:
Robert Kaussow 2017-12-09 13:41:26 +01:00
parent 6dc7622ccf
commit b7e848d174
2 changed files with 3 additions and 1 deletions

View File

@ -29,6 +29,8 @@
group: root
mode: 0644
with_dict: '{{ network_interfaces }}'
loop_control:
label: "{{ item.key }}"
when: item.key in ansible_interfaces
notify:
- network_restart

View File

@ -2,4 +2,4 @@
- name: custom fact
set_fact:
require_reboot: "{{ true if network_fqdn != ansible_fqdn else false }}"
- include: config.yml
- include_tasks: config.yml