Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use default ssh config when connecting to bastion #58

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 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 @@ -367,12 +367,13 @@
ServerAliveCountMax 30
dest: "{{ lookup('env', 'HOME') }}/.ssh/{{ os_keypair_name }}.config"
mode: "0640"
- name: Wait 300 seconds for port 22 to become open and contain "OpenSSH"
ansible.builtin.wait_for:
port: 22
host: "{{ bastion_ip }}"
search_regex: OpenSSH
delay: 10
- name: Check SSH connection to bastion
ansible.builtin.ping:
delegate_to: "{{ bastion_ip }}"
register: ping_result
until: ping_result is succeeded
retries: 60
delay: 5
- name: Get server info from the cluster
openstack.cloud.server_info:
cloud: "{{ os_cloud_name }}"
Expand Down Expand Up @@ -502,7 +503,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
Loading