Browse Source

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
(cherry picked from commit 1e1ea11be9)
changes/10/747710/1
Emilien Macchi 1 month ago
parent
commit
aea1f70ed1
1 changed files with 4 additions and 13 deletions
  1. +4
    -13
      common/deploy-steps-tasks-step-1.yaml

+ 4
- 13
common/deploy-steps-tasks-step-1.yaml View File

@@ -224,21 +224,12 @@
tags:
- container_startup_configs


- name: Write container config scripts
no_log: True
become: true
copy:
content: "{{ item[1].content }}"
dest: "/var/lib/container-config-scripts/{{ item[0] }}"
force: yes
mode: "{{ item[1].mode | default('0600', true) }}"
setype: svirt_sandbox_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 }}"
no_log: True
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…
Cancel
Save