tripleo-heat-templates/common/container_startup_configs_tasks.yaml
Emilien Macchi 87d9949053 Generate startup configs files per step and per container
For each step and each container, generate a unique JSON, and Paunch
will be able to read them all thanks to the patch in dependency
(tripleo-ansible).

Old location:
/var/lib/tripleo-config/container-startup-config-step1.json
We keep the old files for backward compatibility.

New location:
/var/lib/tripleo-config/container-startup-config/step_1/haproxy.json

Note: hashed files won't be generated for the old location anymore,
since it's done via container-puppet.py in which we now give the new
location.

Story: 2006732
Task: 37162
Change-Id: I1cf8923a698d0f6e0b1e00a7985f363a83e914c4
(cherry picked from commit b5a33168a7)
2020-02-05 11:55:06 +00:00

19 lines
573 B
YAML

---
- 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: svirt_sandbox_file_t
- name: "Creating container startup configs for {{ step_path }}"
copy:
content: "{{ item.value | to_nice_json }}"
dest: "/var/lib/tripleo-config/container-startup-config/{{ step_path }}/{{ item.key }}.json"
setype: svirt_sandbox_file_t
mode: 0600
loop: "{{ item.1 | dict2items }}"