From 4000770decfc6bef5e03e33a22cad0be9b2c5797 Mon Sep 17 00:00:00 2001 From: Rabi Mishra Date: Fri, 19 Jun 2020 20:18:12 +0530 Subject: [PATCH] Use folder with plan name with config download export To be consistent with auto config-download and overcloud export create subfloder with plan/stack name. Change-Id: I08b447379ae6e267f8dff11e6e703a991918683c Closes-Bug: #1884246 --- .../playbooks/cli-config-download-export.yaml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tripleo_ansible/playbooks/cli-config-download-export.yaml b/tripleo_ansible/playbooks/cli-config-download-export.yaml index bba4e3916..a95fc8daf 100644 --- a/tripleo_ansible/playbooks/cli-config-download-export.yaml +++ b/tripleo_ansible/playbooks/cli-config-download-export.yaml @@ -28,24 +28,28 @@ pre_tasks: - name: Set config_dir set_fact: - config_dir: "{{ lookup('env', 'HOME')~'/tripleo-config' }}" + config_dir: "{{ lookup('env', 'HOME') ~ '/tripleo-config' }}" when: config_dir is not defined - name: Set config_container set_fact: config_container: "{{ plan ~ '-config' }}" + - name: set work_dir + set_fact: + work_dir: "{{ config_dir ~ '/' ~ plan }}" + tasks: - - name: Clean config_dir + - name: Clean work_dir file: - path: "{{ config_dir }}" + path: "{{ work_dir }}" state: absent when: not preserve_config | bool - name: Create config dir if does not exist file: - path: "{{ config_dir }}" + path: "{{ work_dir }}" state: directory - name: Get config @@ -65,5 +69,5 @@ - name: Extract config download unarchive: src: "{{ config_download_url.tempurl }}" - dest: "{{ config_dir }}" + dest: "{{ work_dir }}" remote_src: true