Skip to content

Commit

Permalink
Merge pull request #285 from lae/fix/issue_221
Browse files Browse the repository at this point in the history
Specify port in known_hosts when adding cluster nodes.
  • Loading branch information
lae authored Dec 4, 2024
2 parents 48084a7 + 04f0b36 commit 8931d12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tasks/pve_add_node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
- name: Identify the SSH public key and SSH addresses of initial cluster host
ansible.builtin.set_fact:
_pve_cluster_host_key: "{{ ' '.join((hostvars[_init_node]._pve_ssh_public_key.content | b64decode).split()[:-1]) }}"
_pve_cluster_host_addresses: "{{ hostvars[_init_node].pve_cluster_ssh_addrs | join(',') }}"
_pve_cluster_host_addresses: "{{ hostvars[_init_node].pve_cluster_ssh_addrs | map('regex_replace', '^(.*)$', (pve_ssh_port == 22) | ternary('\\1', '[\\1]:' + (pve_ssh_port | string))) | join(',') }}"

- name: Temporarily mark that cluster host as known in root user's known_hosts
ansible.builtin.blockinfile:
Expand Down

0 comments on commit 8931d12

Please sign in to comment.