From b847e334b8a81d4b0290882a0d777b53bd78f2f8 Mon Sep 17 00:00:00 2001 From: Mohammed Naser Date: Mon, 20 Mar 2017 18:17:12 -0400 Subject: [PATCH] Resolve evaluation of bifrost-keystone-client-config The owner parameter for some of the tasks for the Keystone client configuration does not have a default fallback, which results in a failure if SUDO_USER is not set in the environment. This patch adds the missing default fallbacks so that it can safely evaluate to root if it missing from the environment. Related-Bug: #1674483 Change-Id: I31a2a33e2fb3b004dfec179426c7d1b4c72301d2 --- playbooks/roles/bifrost-keystone-client-config/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbooks/roles/bifrost-keystone-client-config/tasks/main.yml b/playbooks/roles/bifrost-keystone-client-config/tasks/main.yml index a00be2fc3..35e08be9d 100644 --- a/playbooks/roles/bifrost-keystone-client-config/tasks/main.yml +++ b/playbooks/roles/bifrost-keystone-client-config/tasks/main.yml @@ -35,12 +35,12 @@ file: name: "~{{ user | default('root') }}/.config/openstack" state: directory - owner: "{{ user }}" + owner: "{{ user | default('root') }}" mode: 0700 - name: "Write clouds.yaml configuration from template" template: src: clouds.yaml.j2 dest: "~{{ user | default('root') }}/.config/openstack/clouds.yaml" - owner: "{{ user }}" + owner: "{{ user | default('root') }}" mode: 0600