--- - set_fact: step_path: "{{ item.0 }}" - name: "Create directory for {{ step_path }} container startup configs" file: path: "/var/lib/tripleo-config/container-startup-config/{{ step_path }}/" mode: 0600 recurse: yes setype: container_file_t - name: "Creating container startup configs for {{ step_path }}" copy: content: "{{ startup_data.value | to_nice_json }}" dest: "/var/lib/tripleo-config/container-startup-config/{{ step_path }}/{{ startup_data.key }}.json" setype: container_file_t mode: 0600 no_log: true loop_control: loop_var: startup_data loop: "{{ item.1 | dict2items }}"