Browse Source

Use ansible_user only if ANSIBLE_REMOTE_USER is unset

In a non-standalone deployment config-download is called
with the ANSIBLE_REMOTE_USER defined. This variable is
undefined when using standalone, which is what caused the
related bug. Unfortunately the fix for the related bug
introduced the bug this patch closes. This patch should
work for both non-standalone and standalone deployments.

Change-Id: Ie7234bf113204e8cf847257554b88b899b45d5ee
Related-Bug: #1886497
Closes-Bug: #1887708
changes/87/742287/1
John Fulton 2 years ago
parent
commit
67c4a4f58e
  1. 4
      tripleo_ansible/roles/tripleo_ceph_run_ansible/tasks/create_ceph_ansible_remote_tmp.yml

4
tripleo_ansible/roles/tripleo_ceph_run_ansible/tasks/create_ceph_ansible_remote_tmp.yml

@ -34,8 +34,8 @@
become: true
file:
path: "{{ ceph_ansible_remote_tmp }}"
owner: "{{ ansible_user | default('tripleo-admin', true) }}"
group: "{{ ansible_user | default('tripleo-admin', true) }}"
owner: "{{ lookup('env','ANSIBLE_REMOTE_USER') | default(ansible_user, true) }}"
group: "{{ lookup('env','ANSIBLE_REMOTE_USER') | default(ansible_user, true) }}"
mode: "700"
state: directory

Loading…
Cancel
Save