diff --git a/tasks/container_create.yml b/tasks/container_create.yml index dd48a6f8..2bcc0f1f 100644 --- a/tasks/container_create.yml +++ b/tasks/container_create.yml @@ -111,7 +111,7 @@ ifdown {{ item.value.interface }} ifup {{ item.value.interface }} fi - with_dict: container_networks|default({}) + with_dict: "{{ container_networks|default({}) }}" delegate_to: "{{ physical_host }}" tags: - lxc-container-networks @@ -123,7 +123,7 @@ owner: "root" group: "root" mode: "0644" - with_dict: container_networks|default({}) + with_dict: "{{ container_networks|default({}) }}" notify: - Lxc container restart delegate_to: "{{ physical_host }}" @@ -148,9 +148,9 @@ dest: "/var/lib/lxc/{{ inventory_hostname }}/config" line: "lxc.include = /var/lib/lxc/{{ inventory_hostname }}/{{ item.value.interface }}.ini" backup: "true" - with_dict: container_networks|default({}) - when: > - item.value.interface is defined + with_dict: "{{ container_networks|default({}) }}" + when: + - item.value.interface is defined notify: - Lxc container restart delegate_to: "{{ physical_host }}" @@ -211,7 +211,7 @@ if ! grep '{{ item.key }}={{ item.value }}' /etc/environment; then echo '{{ item.key }}={{ item.value }}' | tee -a /etc/environment fi - with_dict: global_environment_variables | default({}) + with_dict: "{{ global_environment_variables | default({}) }}" when: global_environment_variables is defined delegate_to: "{{ physical_host }}" tags: