From 27d833f13f8d6c9ee526f0fd5d0ef8fff6f2e944 Mon Sep 17 00:00:00 2001
From: Mark Goddard <mark@stackhpc.com>
Date: Fri, 17 Aug 2018 13:12:44 +0100
Subject: [PATCH] Fix kayobe overcloud service config save

If Kolla Ansible config files are not readable by the kayobe (stack)
user, the command will fail. This is fixed by using become.

Also improves the command output, by showing only the path of each file
rather than the full stat result.

Change-Id: I466e6a75822a1b2d2f91c9fadc9730c2cdb5bba0
TrivialFix
---
 ansible/overcloud-service-config-save.yml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ansible/overcloud-service-config-save.yml b/ansible/overcloud-service-config-save.yml
index 257d3a5a..666dbce7 100644
--- a/ansible/overcloud-service-config-save.yml
+++ b/ansible/overcloud-service-config-save.yml
@@ -16,9 +16,13 @@
         paths: "{{ node_config_directory }}"
         recurse: True
       register: find_result
+      become: true
 
     - name: Save overcloud service configuration
       fetch:
         src: "{{ item.path }}"
         dest: "{{ config_save_path }}"
       with_items: "{{ find_result.files }}"
+      become: true
+      loop_control:
+        label: "{{ item.path }}"
-- 
GitLab