Merge "Use discovered private key file"
This commit is contained in:
commit
6635dc6329
@ -473,6 +473,14 @@ outputs:
|
|||||||
when: step == '2'
|
when: step == '2'
|
||||||
tags: ceph
|
tags: ceph
|
||||||
block:
|
block:
|
||||||
|
- name: detect private key file
|
||||||
|
stat:
|
||||||
|
path: "{{playbook_dir}}/ssh_private_key"
|
||||||
|
register: detect_private_key_file
|
||||||
|
- name: set private key file
|
||||||
|
set_fact:
|
||||||
|
ceph_ansible_private_key_file: "{{playbook_dir}}/ssh_private_key"
|
||||||
|
when: ceph_ansible_private_key_file is not defined and detect_private_key_file.stat.exists
|
||||||
- name: run nodes-uuid
|
- name: run nodes-uuid
|
||||||
# needs become to be able to read the ssh private key
|
# needs become to be able to read the ssh private key
|
||||||
become: true
|
become: true
|
||||||
@ -484,7 +492,7 @@ outputs:
|
|||||||
- ANSIBLE_CONFIG="{{playbook_dir}}/ansible.cfg"
|
- ANSIBLE_CONFIG="{{playbook_dir}}/ansible.cfg"
|
||||||
- ANSIBLE_REMOTE_TEMP=/tmp/nodes_uuid_tmp
|
- ANSIBLE_REMOTE_TEMP=/tmp/nodes_uuid_tmp
|
||||||
- ansible-playbook
|
- ansible-playbook
|
||||||
- '{% if ansible_ssh_private_key_file is defined %}--private-key {{ansible_ssh_private_key_file}}{% endif %}'
|
- '{% if ceph_ansible_private_key_file is defined %}--private-key {{ceph_ansible_private_key_file}}{% endif %}'
|
||||||
- '-i'
|
- '-i'
|
||||||
- '{{playbook_dir}}/ceph-ansible/inventory.yml'
|
- '{{playbook_dir}}/ceph-ansible/inventory.yml'
|
||||||
- '{% if ansible_python_interpreter is defined %}-e ansible_python_interpreter={{ansible_python_interpreter}}{% endif %}'
|
- '{% if ansible_python_interpreter is defined %}-e ansible_python_interpreter={{ansible_python_interpreter}}{% endif %}'
|
||||||
@ -576,7 +584,7 @@ outputs:
|
|||||||
data: {get_param: CephAnsibleEnvironmentVariables}
|
data: {get_param: CephAnsibleEnvironmentVariables}
|
||||||
expression: $.data.items().select($[0] + '=' + $[1]).join(' ')
|
expression: $.data.items().select($[0] + '=' + $[1]).join(' ')
|
||||||
- ansible-playbook
|
- ansible-playbook
|
||||||
- '{% if ansible_ssh_private_key_file is defined %}--private-key {{ansible_ssh_private_key_file}}{% endif %}'
|
- '{% if ceph_ansible_private_key_file is defined %}--private-key {{ceph_ansible_private_key_file}}{% endif %}'
|
||||||
- '{% if ansible_python_interpreter is defined %}-e ansible_python_interpreter={{ansible_python_interpreter}}{% endif %}'
|
- '{% if ansible_python_interpreter is defined %}-e ansible_python_interpreter={{ansible_python_interpreter}}{% endif %}'
|
||||||
- '-{%- for number in range(0, ceph_ansible_playbook_verbosity) -%}v{% endfor %}'
|
- '-{%- for number in range(0, ceph_ansible_playbook_verbosity) -%}v{% endfor %}'
|
||||||
- if:
|
- if:
|
||||||
|
Loading…
Reference in New Issue
Block a user