Skip to content

Commit

Permalink
Use default ssh config when connecting to bastion
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Luke Repko <[email protected]>
  • Loading branch information
LukeRepko committed Feb 1, 2024
1 parent 775e607 commit 7166115
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ansible/playbooks/infra-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
network_name: "{{ os_network_name }}-internal"
name: "{{ os_network_name }}-subnet-internal"
cidr: 192.168.0.0/22
# The disable_gateway_ip setting only works
# The disable_gateway_ip setting only works
# on an update and not a create
- name: Update subnet internal
openstack.cloud.subnet:
Expand Down Expand Up @@ -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 }}"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7166115

Please sign in to comment.