Create container config scripts with a new module
Replace a complex copy/loop task by using a new module which will make logging better and deployment eventually a bit faster. Depends-On: https://review.opendev.org/746218 Change-Id: I3e8fae54aa1fb56ce8e3a5967aef7f751e9d2c6e
This commit is contained in:
parent
ef83e08422
commit
1e1ea11be9
|
@ -204,21 +204,12 @@
|
|||
tags:
|
||||
- container_startup_configs
|
||||
|
||||
|
||||
- name: Write container config scripts
|
||||
become: true
|
||||
no_log: True
|
||||
copy:
|
||||
content: "{{ item[1].content }}"
|
||||
dest: "/var/lib/container-config-scripts/{{ item[0] }}"
|
||||
force: yes
|
||||
mode: "{{ item[1].mode | default('0600', true) }}"
|
||||
setype: container_file_t
|
||||
loop: "{{ role_data_container_config_scripts | dictsort }}"
|
||||
loop_control:
|
||||
label: "{{ item[0] }}"
|
||||
vars:
|
||||
role_data_container_config_scripts: "{{ lookup('file', tripleo_role_name + '/container_config_scripts.yaml', errors='ignore') | default({}, True) | from_yaml }}"
|
||||
tripleo_container_config_scripts:
|
||||
config_data: "{{ lookup('file', tripleo_role_name + '/container_config_scripts.yaml', errors='ignore') | default({}, True) | from_yaml }}"
|
||||
config_dir: /var/lib/container-config-scripts
|
||||
tags:
|
||||
- container_config_scripts
|
||||
|
||||
|
|
Loading…
Reference in New Issue