From 49b4b2c9ec0380a9cbce074d19359e1bf0752795 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Thu, 13 Aug 2020 14:56:05 -0400 Subject: [PATCH] Create Container configs with a new module To avoid the repetition of the copy module in a loop for each config, which increases deployment time at scale, replace it via a module that will run faster to create the json files. Change-Id: I3ba96d6e4a0217d32c086f99a27e3e85db21c082 (cherry picked from commit a266382244576d8f9758316993ce9ac23ee9fe9b) --- common/deploy-steps-tasks-step-1.yaml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/common/deploy-steps-tasks-step-1.yaml b/common/deploy-steps-tasks-step-1.yaml index 3b3f3b68fa..8fd89512fb 100644 --- a/common/deploy-steps-tasks-step-1.yaml +++ b/common/deploy-steps-tasks-step-1.yaml @@ -290,18 +290,10 @@ setype: svirt_sandbox_file_t selevel: s0 - - name: Write kolla config json files + - name: Write container config json files become: true - no_log: True - copy: - content: "{{ item[1] | to_nice_json }}" - dest: "{{ item[0] }}" - force: yes - mode: '0600' - setype: svirt_sandbox_file_t - loop: "{{ lookup('file', tripleo_role_name + '/kolla_config.yaml', errors='ignore') | default([], True) | from_yaml | dictsort }}" - loop_control: - label: "{{ item[0] }}" + tripleo_container_configs: + config_data: "{{ lookup('file', tripleo_role_name + '/kolla_config.yaml', errors='ignore') | default({}, True) | from_yaml }}" tags: - container_startup_configs