From 30d5972ee042f32dea2a87f6b095bd48682dde8e Mon Sep 17 00:00:00 2001 From: Luke Repko Date: Thu, 1 Feb 2024 13:52:27 -0600 Subject: [PATCH] Use default ssh config when connecting to bastion During the infra-deploy playbook, ansible connects to the bastion or launcher node. It's best that this be done with the user's default ssh configuration in lieu of the generated one, otherwise connections to the bastion may fail if the user has a default SSH proxy configured. --- ansible/playbooks/infra-deploy.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ansible/playbooks/infra-deploy.yaml b/ansible/playbooks/infra-deploy.yaml index d3bc7575..877f0d8e 100644 --- a/ansible/playbooks/infra-deploy.yaml +++ b/ansible/playbooks/infra-deploy.yaml @@ -373,6 +373,9 @@ host: "{{ bastion_ip }}" search_regex: OpenSSH delay: 10 + vars: + ansible_connection: ssh + ansible_python_interpreter: null - name: Get server info from the cluster openstack.cloud.server_info: cloud: "{{ os_cloud_name }}" @@ -502,7 +505,7 @@ os_bastion_user: ubuntu os_network_name: openstack-flex os_keypair_name: "{{ os_network_name }}-keypair" - ansible_ssh_common_args: "-F {{ lookup('env', 'HOME') }}/.ssh/{{ os_keypair_name }}.config" + # ansible_ssh_common_args: "-F {{ lookup('env', 'HOME') }}/.ssh/{{ os_keypair_name }}.config" ansible_ssh_private_key_file: "{{ lookup('env', 'HOME') }}/.ssh/{{ os_keypair_name }}.key" tasks: - name: Create ssh directory on jump host