Skip to content

Commit 49139f9

Browse files
authored
Merge pull request #64 from trickert76/feature/custom_ssh_port
Allow SSH port for cluster hosts to be configurable
2 parents 611c3d1 + 9213cca commit 49139f9

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
lae.proxmox
55
===========
66

7-
Installs and configures a Proxmox 5.x cluster with the following features:
7+
Installs and configures a Proxmox 5.x/6.x cluster with the following features:
88

99
- Ensures all hosts can connect to one another as root
1010
- Ability to create/manage groups, users, access control lists and storage
@@ -177,6 +177,7 @@ pve_storages:
177177
content: [ "images", "iso", "backup" ]
178178
path: /plop
179179
maxfiles: 4
180+
pve_ssh_port: 22
180181
181182
interfaces_template: "interfaces-{{ pve_group }}.j2"
182183
```
@@ -216,6 +217,10 @@ of the `ops` group. Read the **User and ACL Management** section for more info.
216217
The backend needs to be supported by [Proxmox](https://pve.proxmox.com/pve-docs/chapter-pvesm.html).
217218
Read the **Storage Management** section for more info.
218219

220+
'pve_ssh_port' allows you to change the SSH service port. If your SSH is listing
221+
on a different port then 22, please set this variable. If a new node is joining
222+
the cluster, the PVE cluster needs to communicate once via SSH.
223+
219224
`interfaces_template` is set to the path of a template we'll use for configuring
220225
the network on these Debian machines. This is only necessary if you want to
221226
manage networking from Ansible rather than manually or via each host in PVE.

defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,4 @@ pve_groups: []
4343
pve_users: []
4444
pve_acls: []
4545
pve_storages: []
46+
pve_ssh_port: 22

tasks/ssh_cluster_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
{% for host in groups[pve_group] %}
3636
Host {{ hostvars[host].ansible_fqdn }} {{ hostvars[host].ansible_hostname }} {{ hostvars[host].ansible_default_ipv4.address }}
3737
IdentityFile /root/.ssh/id_rsa
38+
Port {{ pve_ssh_port }}
3839
{% endfor %}
3940
4041
- name: Allow root logins from PVE cluster hosts

0 commit comments

Comments
 (0)