Skip to content

Commit

Permalink
Release 1.6.1
Browse files Browse the repository at this point in the history
Merge branch 'develop' into master
  • Loading branch information
lae committed Aug 27, 2019
2 parents 383115c + 4650f4c commit f85ec2f
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 5 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
lae.proxmox
===========

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

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

`pve_ssh_port` allows you to change the SSH service port. If your SSH is listing
on a different port then 22, please set this variable. If a new node is joining
the cluster, the PVE cluster needs to communicate once via SSH.

`interfaces_template` is set to the path of a template we'll use for configuring
the network on these Debian machines. This is only necessary if you want to
manage networking from Ansible rather than manually or via each host in PVE.
Expand Down Expand Up @@ -388,6 +393,7 @@ pve_zfs_enabled: no # Specifies whether or not to install and configure ZFS pack
# pve_zfs_options: "" # modprobe parameters to pass to zfs module on boot/modprobe
# pve_zfs_zed_email: "" # Should be set to an email to receive ZFS notifications
pve_ceph_enabled: false # Specifies wheter or not to install and configure Ceph packages. See below for an example configuration.
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)
pve_ceph_network: "{{ (ansible_default_ipv4.network +'/'+ ansible_default_ipv4.netmask) | ipaddr('net') }}" # Ceph cluster network
pve_ceph_mon_group: "{{ pve_group }}" # Host group containing all Ceph monitor hosts
pve_ceph_mds_group: "{{ pve_group }}" # Host group containing all Ceph metadata server hosts
Expand Down
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pve_zfs_enabled: no
# pve_zfs_options: "parameters to pass to zfs module"
# pve_zfs_zed_email: "email address for zfs events"
pve_ceph_enabled: false
pve_ceph_repository_line: "{{ pve_ceph_repo }}"
pve_ceph_network: "{{ (ansible_default_ipv4.network +'/'+ ansible_default_ipv4.netmask) | ipaddr('net') }}"
pve_ceph_mon_group: "{{ pve_group }}"
pve_ceph_mds_group: "{{ pve_group }}"
Expand All @@ -42,3 +43,4 @@ pve_groups: []
pve_users: []
pve_acls: []
pve_storages: []
pve_ssh_port: 22
6 changes: 5 additions & 1 deletion tasks/ceph.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This is an Ansible version of what "pveceph install" actually does
- name: Configure Ceph package source
apt_repository:
repo: 'deb http://download.proxmox.com/debian/ceph-luminous stretch main'
repo: '{{ pve_ceph_repository_line }}'
filename: ceph.list
state: present

Expand All @@ -24,11 +24,15 @@
group: root
mode: preserve
notify: 'restart ceph'
when:
- "ansible_distribution_release == 'stretch'"

- name: Enable Ceph
systemd:
name: ceph.service
enabled: true
when:
- "ansible_distribution_release == 'stretch'"

- name: Create initial Ceph config
command: 'pveceph init --network {{ pve_ceph_network }}'
Expand Down
6 changes: 3 additions & 3 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
when: "pve_cluster_enabled | bool"

- import_tasks: ceph.yml
when: pve_ceph_enabled
when: "pve_ceph_enabled | bool"

- name: Configure Proxmox groups
proxmox_group:
Expand Down Expand Up @@ -194,7 +194,7 @@
path: "/etc/pve/datacenter.cfg"
state: "touch"
when:
- not pve_cluster_enabled or (pve_cluster_enabled and inventory_hostname == groups[pve_group][0])
- not pve_cluster_enabled | bool or (pve_cluster_enabled and inventory_hostname == groups[pve_group][0])
- pve_datacenter_cfg | length > 0
- not _datacenter_cfg.stat.exists

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

- import_tasks: ssl_config.yml
Expand Down
1 change: 1 addition & 0 deletions tasks/ssh_cluster_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
{% for host in groups[pve_group] %}
Host {{ hostvars[host].ansible_fqdn }} {{ hostvars[host].ansible_hostname }} {{ hostvars[host].ansible_default_ipv4.address }}
IdentityFile /root/.ssh/id_rsa
Port {{ pve_ssh_port }}
{% endfor %}
- name: Allow root logins from PVE cluster hosts
Expand Down
1 change: 1 addition & 0 deletions vars/debian-buster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
pve_release_key: proxmox-ve-release-6.x.asc
pve_release_key_id: 7BF2812E8A6E88E0
pve_ssh_ciphers: "aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com"
pve_ceph_repo: deb http://download.proxmox.com/debian/ceph-nautilus buster main
1 change: 1 addition & 0 deletions vars/debian-stretch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
pve_release_key: proxmox-ve-release-5.x.asc
pve_release_key_id: 0D9A1950E2EF0603
pve_ssh_ciphers: "aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com"
pve_ceph_repo: "deb http://download.proxmox.com/debian/ceph-luminous stretch main"

0 comments on commit f85ec2f

Please sign in to comment.