Elevated privs are required to access files in home directory
Now that the config-download playbooks are located in the home directory. We (tripleo-admin) needs elevated privs on the tasks that require access to those file. This patch adds the required become: true statements to those tasks. Additionally, the current playbook looks for a specific ssh key, if that key doesn't exist, it fails to ssh to the overcloud nodes. To fix this, we can reference the ENV variable we're already setting during the config-download deployment. Change-Id: Ia97a5b0054bed697fc0390674fe4dba8317386a1 Closes-Bug: #1881420
This commit is contained in:
parent
a44d8fd767
commit
96e26ef812
|
@ -289,10 +289,12 @@ outputs:
|
|||
- "{{ octavia_ansible_group_vars.octavia_local_tmpdir }}"
|
||||
- "{{ octavia_ansible_group_vars.octavia_group_vars_dir }}"
|
||||
- name: Write group_vars file
|
||||
become: true
|
||||
copy:
|
||||
dest: "{{ octavia_ansible_group_vars.octavia_group_vars_dir }}/octavia_vars.yaml"
|
||||
content: "{{ octavia_ansible_group_vars|to_nice_yaml }}"
|
||||
- name: Write octavia inventory
|
||||
become: true
|
||||
copy:
|
||||
dest: "{{playbook_dir}}/octavia-ansible/inventory.yaml"
|
||||
content: |
|
||||
|
@ -324,12 +326,13 @@ outputs:
|
|||
|
||||
{%- endfor -%}
|
||||
- name: Check for ssh_private_key in working directory
|
||||
become: true
|
||||
stat:
|
||||
path: "{{playbook_dir}}/ssh_private_key"
|
||||
path: "{{ lookup('env', 'ANSIBLE_PRIVATE_KEY_FILE') }}"
|
||||
register: detect_private_key_file
|
||||
- name: Set private key location
|
||||
set_fact:
|
||||
octavia_ansible_ssh_key: "{{ playbook_dir }}/ssh_private_key"
|
||||
octavia_ansible_ssh_key: "{{ lookup('env', 'ANSIBLE_PRIVATE_KEY_FILE') }}"
|
||||
when: octavia_ansible_ssh_key is not defined and detect_private_key_file.stat.exists
|
||||
- name: Configure octavia command
|
||||
set_fact:
|
||||
|
|
Loading…
Reference in New Issue