Skip to content

Commit 383115c

Browse files
committed
Release 1.6.0
Merge branch 'develop' into master
2 parents 3d188ec + 4b5a86d commit 383115c

21 files changed

+423
-27
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44

55
ansible.cfg
66
*.retry
7+
/.project
8+
/.pydevproject

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@ cache:
88
matrix:
99
fast_finish: true
1010
env:
11-
- ANSIBLE_GIT_VERSION='devel' # 2.8.x development branch
11+
- ANSIBLE_GIT_VERSION='devel' # 2.9.x development branch
12+
- ANSIBLE_VERSION='<2.9.0' # 2.8.x
1213
- ANSIBLE_VERSION='<2.8.0' # 2.7.x
1314
- ANSIBLE_VERSION='<2.7.0' # 2.6.x
1415
install:
1516
- if [ "$ANSIBLE_GIT_VERSION" ]; then pip install "https://github.com/ansible/ansible/archive/${ANSIBLE_GIT_VERSION}.tar.gz";
1617
else pip install "ansible${ANSIBLE_VERSION}"; fi;
1718
pip install --pre ansible-lint; pip install jmespath
1819
- ansible --version
19-
- ansible-galaxy install lae.travis-lxc
20+
- ansible-galaxy install lae.travis-lxc,v0.8.1
2021
- ansible-playbook tests/install.yml -i tests/inventory
2122
- git archive --format tar.gz HEAD > lae.proxmox.tar.gz && ansible-galaxy install
2223
lae.proxmox.tar.gz,$(git rev-parse HEAD),lae.proxmox && rm lae.proxmox.tar.gz

README.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Installs and configures a Proxmox 5.x cluster with the following features:
99
- Ensures all hosts can connect to one another as root
1010
- Ability to create/manage groups, users, access control lists and storage
1111
- Ability to create or add nodes to a PVE cluster
12+
- Ability to setup Ceph on the nodes
1213
- IPMI watchdog support
1314
- BYO HTTPS certificate support
1415
- Ability to use either `pve-no-subscription` or `pve-enterprise` repositories
@@ -386,12 +387,21 @@ pve_watchdog_ipmi_timeout: 10 # Number of seconds the watchdog should wait
386387
pve_zfs_enabled: no # Specifies whether or not to install and configure ZFS packages
387388
# pve_zfs_options: "" # modprobe parameters to pass to zfs module on boot/modprobe
388389
# pve_zfs_zed_email: "" # Should be set to an email to receive ZFS notifications
390+
pve_ceph_enabled: false # Specifies wheter or not to install and configure Ceph packages. See below for an example configuration.
391+
pve_ceph_network: "{{ (ansible_default_ipv4.network +'/'+ ansible_default_ipv4.netmask) | ipaddr('net') }}" # Ceph cluster network
392+
pve_ceph_mon_group: "{{ pve_group }}" # Host group containing all Ceph monitor hosts
393+
pve_ceph_mds_group: "{{ pve_group }}" # Host group containing all Ceph metadata server hosts
394+
pve_ceph_osds: [] # List of OSD disks
395+
pve_ceph_pools: [] # List of pools to create
396+
pve_ceph_fs: [] # List of CephFS filesystems to create
397+
pve_ceph_crush_rules: [] # List of CRUSH rules to create
389398
# pve_ssl_private_key: "" # Should be set to the contents of the private key to use for HTTPS
390399
# pve_ssl_certificate: "" # Should be set to the contents of the certificate to use for HTTPS
391400
pve_ssl_letsencrypt: false # Specifies whether or not to obtain a SSL certificate using Let's Encrypt
392401
pve_groups: [] # List of group definitions to manage in PVE. See section on User Management.
393402
pve_users: [] # List of user definitions to manage in PVE. See section on User Management.
394403
pve_storages: [] # List of storages to manage in PVE. See section on Storage Management.
404+
pve_datacenter_cfg: {} # Dictionary to configure the PVE datacenter.cfg config file.
395405
```
396406

397407
To enable clustering with this role, configure the following variables appropriately:
@@ -412,6 +422,15 @@ pve_cluster_bindnet0_addr: "{{ pve_cluster_ring0_addr }}"
412422
413423
```
414424

425+
You can set options in the datacenter.cfg configuration file:
426+
```
427+
pve_datacenter_cfg:
428+
keyboard: en-us
429+
```
430+
431+
All configuration options supported in the datacenter.cfg file are documented in the
432+
[Proxmox manual datacenter.cfg section][datacenter-cfg].
433+
415434
## Dependencies
416435

417436
This role does not install NTP, so you should configure NTP yourself, e.g. with
@@ -526,6 +545,47 @@ pve_storages:
526545
Refer to `library/proxmox_storage.py` [link][storage-module] for module
527546
documentation.
528547

548+
## Ceph configuration
549+
550+
This role can configure the Ceph storage system on your Proxmox hosts.
551+
552+
```
553+
pve_ceph_enabled: true
554+
pve_ceph_network: '172.10.0.0/24'
555+
pve_ceph_osds:
556+
# OSD with everything on the same device
557+
- device: /dev/sdc
558+
# OSD with block.db/WAL on another device
559+
- device: /dev/sdd
560+
block.db: /dev/sdb1
561+
# Crush rules for different storage classes
562+
pve_ceph_crush_rules:
563+
- name: ssd
564+
class: ssd
565+
- name: hdd
566+
class: hdd
567+
# 2 Ceph pools for VM disks which will also be defined as Proxmox storages
568+
# Using different CRUSH rules
569+
pve_ceph_pools:
570+
- name: ssd
571+
pgs: 128
572+
rule: ssd
573+
application: rbd
574+
storage: true
575+
- name: hdd
576+
pgs: 32
577+
rule: hdd
578+
application: rbd
579+
storage: true
580+
# A CephFS filesystem not defined as a Proxmox storage
581+
pve_ceph_fs:
582+
- name: backup
583+
pgs: 64
584+
rule: hdd
585+
storage: false
586+
mountpoint: /srv/proxmox/backup
587+
```
588+
529589
## Contributors
530590

531591
Musee Ullah ([@lae](https://github.com/lae), <[email protected]>)
@@ -543,3 +603,4 @@ Fabien Brachere ([@Fbrachere](https://github.com/Fbrachere))
543603
[group-module]: https://github.com/lae/ansible-role-proxmox/blob/master/library/proxmox_group.py
544604
[acl-module]: https://github.com/lae/ansible-role-proxmox/blob/master/library/proxmox_group.py
545605
[storage-module]: https://github.com/lae/ansible-role-proxmox/blob/master/library/proxmox_storage.py
606+
[datacenter-cfg]: https://pve.proxmox.com/wiki/Manual:_datacenter.cfg

defaults/main.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,27 @@ pve_watchdog_ipmi_timeout: 10
1616
pve_zfs_enabled: no
1717
# pve_zfs_options: "parameters to pass to zfs module"
1818
# pve_zfs_zed_email: "email address for zfs events"
19+
pve_ceph_enabled: false
20+
pve_ceph_network: "{{ (ansible_default_ipv4.network +'/'+ ansible_default_ipv4.netmask) | ipaddr('net') }}"
21+
pve_ceph_mon_group: "{{ pve_group }}"
22+
pve_ceph_mds_group: "{{ pve_group }}"
23+
pve_ceph_osds: []
24+
pve_ceph_pools: []
25+
pve_ceph_fs: []
26+
pve_ceph_crush_rules: []
1927
# pve_ssl_private_key: "contents of private key"
2028
# pve_ssl_certificate: "contents of certificate"
2129
pve_cluster_enabled: no
2230
pve_cluster_clustername: "{{ pve_group }}"
31+
# PVE 5.x (Debian Stretch) clustering options
2332
pve_cluster_ring0_addr: "{{ ansible_default_ipv4.address }}"
2433
pve_cluster_bindnet0_addr: "{{ pve_cluster_ring0_addr }}"
2534
# pve_cluster_ring1_addr: "another interface's IP address or hostname"
2635
# pve_cluster_bindnet1_addr: "{{ pve_cluster_ring1_addr }}"
36+
# PVE 6.x (Debian Buster) clustering options
37+
pve_cluster_link0_addr: "{{ ansible_default_ipv4.address }}"
38+
# pve_cluster_link1_addr: "another interface's IP address or hostname"
39+
pve_datacenter_cfg: {}
2740
pve_ssl_letsencrypt: false
2841
pve_groups: []
2942
pve_users: []

files/proxmox-ve-release-6.x.asc

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
-----BEGIN PGP PUBLIC KEY BLOCK-----
2+
3+
mQINBFvydv4BEACqs61eF4B+Zz9H0hKJS72SEofK2Gy6a5wZ/Hb4DrGbbfC6fjrO
4+
b3r4ZrM7G355TD5He7qzcGrxJjgGwH+/w6xRyYliIzxD/lp8UJXcmiZHG+MYYJP6
5+
q29NWrbEcqPo6onx2tzNytHIUysqUE+mghXtyMN7KUMip7bDAqx2L51CI180Giv1
6+
wdKUBP2bgKVObyFzK46ZEMzyl2qr9raFnHA8oF1HZRkwwcfSD/dkY7oJvAO1pXgR
7+
8PzcXnXjoRTCyWlYVZYn54y9OjnB+knN8BlSOLNdBkKZs74XyJ9JlQU9ZfzatXXE
8+
hMxdDquIAg+g/W9rLpLz5XAGb2GSNvKrU5otjOdUO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kmm1eW7ZFQVx6o0w9dWRRqDo7UklVNPImtXuso3nI
25+
wuYF0+Dv6PeE8EQWLp4FQGHlaEoUmYFug4xiWF1tCcW6UWy6fEhVAcXbbD0IvUjS
26+
6pL9IKpyOWDJBV0Tya4LmBAzaPB7ljYfEBASvaPVKDcSva6wEM8/vA6Oal2/LVdQ
27+
8TG5eRrtWxeZxZSQknv0v3IhPujyP9dxvhJfZmVZKQx/oPgEWFmGuQ8ggXtNZL/8
28+
72I=
29+
=ssmE
30+
-----END PGP PUBLIC KEY BLOCK-----

handlers/main.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,11 @@
2424
service:
2525
name: zfs-zed
2626
state: restarted
27+
28+
- name: restart ceph
29+
# Needs to use the systemd module directly to be able to
30+
# reload the systemd daemon
31+
systemd:
32+
name: ceph.service
33+
state: restarted
34+
daemon_reload: true

library/proxmox_storage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
required: true
3939
aliases: [ "storagecontent" ]
4040
type: list
41-
choices: [ "images", "rootdir", "vztmpl", "backup", "iso" ]
41+
choices: [ "images", "rootdir", "vztmpl", "backup", "iso", "snippets" ]
4242
description:
4343
- Contents supported by the storage, not all storage
4444
types support all content types.

meta/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ galaxy_info:
1010
- name: Debian
1111
versions:
1212
- stretch
13+
- buster
1314

1415
galaxy_tags:
1516
- proxmox

0 commit comments

Comments
 (0)