Merge "Cleanup all container startup configs before generating the new ones"
This commit is contained in:
commit
66e728c278
|
@ -1,18 +1,23 @@
|
||||||
---
|
---
|
||||||
- set_fact:
|
|
||||||
step_path: "{{ item.0 }}"
|
|
||||||
|
|
||||||
- name: "Create directory for {{ step_path }} container startup configs"
|
# TODO(emilien) convert this whole task in a module
|
||||||
|
# https://bugs.launchpad.net/tripleo/+bug/1884577
|
||||||
|
- name: "Remove old {{ item.0 }} container startup configs"
|
||||||
file:
|
file:
|
||||||
path: "/var/lib/tripleo-config/container-startup-config/{{ step_path }}/"
|
path: "/var/lib/tripleo-config/container-startup-config/{{ item.0 }}"
|
||||||
|
state: absent
|
||||||
|
|
||||||
|
- name: "Create directory for {{ item.0 }} container startup configs"
|
||||||
|
file:
|
||||||
|
path: "/var/lib/tripleo-config/container-startup-config/{{ item.0 }}/"
|
||||||
mode: 0600
|
mode: 0600
|
||||||
recurse: yes
|
recurse: yes
|
||||||
setype: container_file_t
|
setype: container_file_t
|
||||||
|
|
||||||
- name: "Creating container startup configs for {{ step_path }}"
|
- name: "Creating container startup configs for {{ item.0 }}"
|
||||||
copy:
|
copy:
|
||||||
content: "{{ startup_data.value | to_nice_json }}"
|
content: "{{ startup_data.value | to_nice_json }}"
|
||||||
dest: "/var/lib/tripleo-config/container-startup-config/{{ step_path }}/{{ startup_data.key }}.json"
|
dest: "/var/lib/tripleo-config/container-startup-config/{{ item.0 }}/{{ startup_data.key }}.json"
|
||||||
setype: container_file_t
|
setype: container_file_t
|
||||||
mode: 0600
|
mode: 0600
|
||||||
no_log: true
|
no_log: true
|
||||||
|
|
Loading…
Reference in New Issue