We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 48084a7 + 04f0b36 commit 8931d12Copy full SHA for 8931d12
tasks/pve_add_node.yml
@@ -3,7 +3,7 @@
3
- name: Identify the SSH public key and SSH addresses of initial cluster host
4
ansible.builtin.set_fact:
5
_pve_cluster_host_key: "{{ ' '.join((hostvars[_init_node]._pve_ssh_public_key.content | b64decode).split()[:-1]) }}"
6
- _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(',') }}"
7
8
- name: Temporarily mark that cluster host as known in root user's known_hosts
9
ansible.builtin.blockinfile:
0 commit comments