summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--playbooks/provisioning/openstack/provision-openstack.yml2
-rw-r--r--roles/static_inventory/templates/inventory.j22
2 files changed, 2 insertions, 2 deletions
diff --git a/playbooks/provisioning/openstack/provision-openstack.yml b/playbooks/provisioning/openstack/provision-openstack.yml
index e4705bd2c..bf424676d 100644
--- a/playbooks/provisioning/openstack/provision-openstack.yml
+++ b/playbooks/provisioning/openstack/provision-openstack.yml
@@ -15,7 +15,7 @@
- role: static_inventory
when: openstack_inventory|default('static') == 'static'
inventory_path: "{{ openstack_inventory_path|default(inventory_dir) }}"
- private_ssh_key: "{{ openstack_private_ssh_key|default('~/.ssh/id_rsa') }}"
+ private_ssh_key: "{{ openstack_private_ssh_key|default('') }}"
ssh_config_path: "{{ openstack_ssh_config_path|default('/tmp/ssh.config.openshift.ansible' + '.' + stack_name) }}"
ssh_user: "{{ ansible_user }}"
diff --git a/roles/static_inventory/templates/inventory.j2 b/roles/static_inventory/templates/inventory.j2
index 2245963c0..8863fb7c4 100644
--- a/roles/static_inventory/templates/inventory.j2
+++ b/roles/static_inventory/templates/inventory.j2
@@ -12,7 +12,7 @@
%} public_v4={{ hostvars[host]['public_v4'] }}{% endif %}
{% if 'ansible_user' in hostvars[host]
%} ansible_user={{ hostvars[host]['ansible_user'] }}{% endif %}
-{% if 'ansible_private_key_file' in hostvars[host]
+{% if 'ansible_private_key_file' in hostvars[host] and hostvars[host]['ansible_private_key_file']
%} ansible_private_key_file={{ hostvars[host]['ansible_private_key_file'] }}{% endif %}
{% if use_bastion|bool and 'ansible_ssh_extra_args' in hostvars[host]
%} ansible_ssh_extra_args={{ hostvars[host]['ansible_ssh_extra_args']|quote }}{% endif %} openshift_hostname={{ host }}