Skip to content
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
26 changes: 26 additions & 0 deletions users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

- name: Build list of installed servers
set_fact:
server_list: "{{ server_list | default([]) + [ {'server': config.server, 'IP_subject_alt_name': config.IP_subject_alt_name} ] }}"

Check failure on line 27 in users.yml

View workflow job for this annotation

GitHub Actions / Linting

jinja[spacing]

Jinja2 spacing could be improved: {{ server_list | default([]) + [ {'server': config.server, 'IP_subject_alt_name': config.IP_subject_alt_name} ] }} -> {{ server_list | default([]) + [{'server': config.server, 'IP_subject_alt_name': config.IP_subject_alt_name}] }}
loop: "{{ _configs_list.files }}"
loop_control:
label: "{{ item.path }}"
Expand All @@ -51,6 +51,32 @@
include_vars:
file: configs/{{ algo_server }}/.config.yml

- name: Test SSH connectivity to server
wait_for:
host: "{{ algo_server }}"
port: "{{ ansible_ssh_port | default(ssh_port) | int }}"
timeout: 10
register: ssh_check
ignore_errors: true
when: algo_server != 'localhost'

- name: Fail with helpful message if server unreachable
fail:
msg: |
Cannot connect to {{ algo_server }} on port {{ ansible_ssh_port | default(ssh_port) }}.

Possible causes:
- Server is not running (check your cloud provider console)
- IP address changed (common after EC2 restart without Elastic IP)
- Firewall/security group blocking port {{ ansible_ssh_port | default(ssh_port) }}

To diagnose:
nc -zv {{ algo_server }} {{ ansible_ssh_port | default(ssh_port) }}
ssh -vvv -p {{ ansible_ssh_port | default(ssh_port) }} -i configs/algo.pem {{ server_user | default('algo') }}@{{ algo_server }}
when:
- algo_server != 'localhost'
- ssh_check is failed

- when: ipsec_enabled
block:
- name: CA password prompt
Expand Down
Loading