Skip to content

Commit f85ec2f

Browse files
committed
Release 1.6.1
Merge branch 'develop' into master
2 parents 383115c + 4650f4c commit f85ec2f

File tree

7 files changed

+20
-5
lines changed

7 files changed

+20
-5
lines changed

README.md

Lines changed: 7 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.
@@ -388,6 +393,7 @@ pve_zfs_enabled: no # Specifies whether or not to install and configure ZFS pack
388393
# pve_zfs_options: "" # modprobe parameters to pass to zfs module on boot/modprobe
389394
# pve_zfs_zed_email: "" # Should be set to an email to receive ZFS notifications
390395
pve_ceph_enabled: false # Specifies wheter or not to install and configure Ceph packages. See below for an example configuration.
396+
pve_ceph_repository_line: "deb http://download.proxmox.com/debian/ceph-nautilus buster main" # apt-repository configuration. Will be automatically set for 5.x and 6.x (Further information: https://pve.proxmox.com/wiki/Package_Repositories)
391397
pve_ceph_network: "{{ (ansible_default_ipv4.network +'/'+ ansible_default_ipv4.netmask) | ipaddr('net') }}" # Ceph cluster network
392398
pve_ceph_mon_group: "{{ pve_group }}" # Host group containing all Ceph monitor hosts
393399
pve_ceph_mds_group: "{{ pve_group }}" # Host group containing all Ceph metadata server hosts

defaults/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ pve_zfs_enabled: no
1717
# pve_zfs_options: "parameters to pass to zfs module"
1818
# pve_zfs_zed_email: "email address for zfs events"
1919
pve_ceph_enabled: false
20+
pve_ceph_repository_line: "{{ pve_ceph_repo }}"
2021
pve_ceph_network: "{{ (ansible_default_ipv4.network +'/'+ ansible_default_ipv4.netmask) | ipaddr('net') }}"
2122
pve_ceph_mon_group: "{{ pve_group }}"
2223
pve_ceph_mds_group: "{{ pve_group }}"
@@ -42,3 +43,4 @@ pve_groups: []
4243
pve_users: []
4344
pve_acls: []
4445
pve_storages: []
46+
pve_ssh_port: 22

tasks/ceph.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This is an Ansible version of what "pveceph install" actually does
22
- name: Configure Ceph package source
33
apt_repository:
4-
repo: 'deb http://download.proxmox.com/debian/ceph-luminous stretch main'
4+
repo: '{{ pve_ceph_repository_line }}'
55
filename: ceph.list
66
state: present
77

@@ -24,11 +24,15 @@
2424
group: root
2525
mode: preserve
2626
notify: 'restart ceph'
27+
when:
28+
- "ansible_distribution_release == 'stretch'"
2729

2830
- name: Enable Ceph
2931
systemd:
3032
name: ceph.service
3133
enabled: true
34+
when:
35+
- "ansible_distribution_release == 'stretch'"
3236

3337
- name: Create initial Ceph config
3438
command: 'pveceph init --network {{ pve_ceph_network }}'

tasks/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
when: "pve_cluster_enabled | bool"
132132

133133
- import_tasks: ceph.yml
134-
when: pve_ceph_enabled
134+
when: "pve_ceph_enabled | bool"
135135

136136
- name: Configure Proxmox groups
137137
proxmox_group:
@@ -194,7 +194,7 @@
194194
path: "/etc/pve/datacenter.cfg"
195195
state: "touch"
196196
when:
197-
- not pve_cluster_enabled or (pve_cluster_enabled and inventory_hostname == groups[pve_group][0])
197+
- not pve_cluster_enabled | bool or (pve_cluster_enabled and inventory_hostname == groups[pve_group][0])
198198
- pve_datacenter_cfg | length > 0
199199
- not _datacenter_cfg.stat.exists
200200

@@ -209,7 +209,7 @@
209209
{{ k }}: {{ v }}
210210
{% endfor %}
211211
when:
212-
- not pve_cluster_enabled or (pve_cluster_enabled and inventory_hostname == groups[pve_group][0])
212+
- not pve_cluster_enabled | bool or (pve_cluster_enabled and inventory_hostname == groups[pve_group][0])
213213
- pve_datacenter_cfg | length > 0
214214

215215
- import_tasks: ssl_config.yml

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

vars/debian-buster.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
pve_release_key: proxmox-ve-release-6.x.asc
33
pve_release_key_id: 7BF2812E8A6E88E0
44
pve_ssh_ciphers: "aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected],[email protected]"
5+
pve_ceph_repo: deb http://download.proxmox.com/debian/ceph-nautilus buster main

vars/debian-stretch.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
pve_release_key: proxmox-ve-release-5.x.asc
33
pve_release_key_id: 0D9A1950E2EF0603
44
pve_ssh_ciphers: "aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected],[email protected]"
5+
pve_ceph_repo: "deb http://download.proxmox.com/debian/ceph-luminous stretch main"

0 commit comments

Comments
 (0)