From 12e644f4f453b7853bc68c147734158406bdce62 Mon Sep 17 00:00:00 2001
From: Mark Goddard <mark@stackhpc.com>
Date: Sat, 29 Sep 2018 10:17:10 +0100
Subject: [PATCH] Add become for Cinder configuration tasks

This is required to support execution as a non-root user.

Change-Id: I017b44352a33884102fefbacdde0fddc7f0282e3
Closes-Bug: #1795125
---
 ansible/roles/cinder/tasks/config.yml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ansible/roles/cinder/tasks/config.yml b/ansible/roles/cinder/tasks/config.yml
index 20ed1ccc9a..348f5674dd 100644
--- a/ansible/roles/cinder/tasks/config.yml
+++ b/ansible/roles/cinder/tasks/config.yml
@@ -49,6 +49,7 @@
 - name: Copying over cinder-wsgi.conf
   vars:
     service: "{{ cinder_services['cinder-api'] }}"
+  become: true
   template:
     src: "{{ item }}"
     dest: "{{ node_config_directory }}/cinder-api/cinder-wsgi.conf"
@@ -88,6 +89,7 @@
     - Restart cinder-backup container
 
 - name: Copying over existing policy file
+  become: true
   template:
     src: "{{ cinder_policy_file_path }}"
     dest: "{{ node_config_directory }}/{{ item.key }}/{{ cinder_policy_file }}"
@@ -103,6 +105,7 @@
     - Restart cinder-backup container
 
 - name: Copying over nfs_shares files for cinder_volume
+  become: true
   template:
     src: "{{ item }}"
     dest: "{{ node_config_directory }}/cinder-volume/nfs_shares"
-- 
GitLab