Make Kubespray install work without --private-key too
It seems the ansible_ssh_private_key_file variable is only defined when --private-key parameter is passed to the main deployment Ansible run. This is always true for deploying via tripleoclient and Mistral, but may not be true when deploying via manual ansible-playbook execution. We now check whether the variable is defined before using it. If it's not defined, user's default ssh key will be used for trying to connect to the overcloud nodes. Change-Id: Id04d3bab85713d644899694231dd4009a88385af
This commit is contained in:
parent
f253c0d08d
commit
ac6c11f7aa
@ -169,7 +169,7 @@ outputs:
|
||||
-i '{{playbook_dir}}/kubespray/inventory.yml'
|
||||
--skip-tags docker,bastion-ssh-config
|
||||
--extra-vars '@{{playbook_dir}}/kubespray/global_vars.yml'
|
||||
--private-key '{{ansible_ssh_private_key_file}}'
|
||||
{% if ansible_ssh_private_key_file is defined %}--private-key '{{ansible_ssh_private_key_file}}'{% endif %}
|
||||
'{{playbook_dir}}/kubespray/playbook.yml'
|
||||
{%- endif -%}
|
||||
- name: print kubespray command
|
||||
|
Loading…
Reference in New Issue
Block a user