From 50dddc3ace4c4c40e3d1680ddcceb789a47ae3fb Mon Sep 17 00:00:00 2001
From: Mark Goddard <mark@stackhpc.com>
Date: Tue, 22 Dec 2020 13:51:23 +0000
Subject: [PATCH] Ubuntu: fix pip configuration for kolla user

On Ubuntu, Kayobe can fail creating pip configuration for the kolla
user, with the following error:

    Failed to set permissions on the temporary files Ansible needs to
    create when becoming an unprivileged user

An earlier error seen with Ansible verbose mode shows that the setfacl
command is missing. It can be installed using the acl package, however
this is not always present in Ubuntu 20.04.

This change installs the acl package in the pip role.

Story: 2004960
Task: 41492

Change-Id: Ib5462684fa5fd307068c67f9a13f73b80967beb4
---
 ansible/roles/pip/tasks/pip_conf.yml | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/ansible/roles/pip/tasks/pip_conf.yml b/ansible/roles/pip/tasks/pip_conf.yml
index 6d473da0..3fa3493d 100644
--- a/ansible/roles/pip/tasks/pip_conf.yml
+++ b/ansible/roles/pip/tasks/pip_conf.yml
@@ -1,4 +1,11 @@
 ---
+# NOTE(mgoddard): The acl package is required for the setfacl command, used by
+# become_user.
+- name: Ensure acl package is installed
+  package:
+    name: acl
+  become: true
+
 - name: Create local .pip directory
   file:
     path: "~{{ item }}/.pip"
-- 
GitLab