From b7e848d174a5e0181ee350cd7ba3299db1bcc097 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sat, 9 Dec 2017 13:41:26 +0100 Subject: [PATCH] use loop control --- tasks/config.yml | 2 ++ tasks/main.yml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tasks/config.yml b/tasks/config.yml index e77b369..4e8697b 100644 --- a/tasks/config.yml +++ b/tasks/config.yml @@ -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 diff --git a/tasks/main.yml b/tasks/main.yml index 35ea12e..8c06f5a 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -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