Skip to content

Commit 3d188ec

Browse files
committed
Release 1.5.0
Merge branch 'develop' into master
2 parents 0afc625 + b1ea429 commit 3d188ec

27 files changed

+613
-218
lines changed

.travis.yml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,21 @@ cache:
88
matrix:
99
fast_finish: true
1010
env:
11-
- ANSIBLE_GIT_VERSION='devel' # 2.6.x development branch
12-
- ANSIBLE_VERSION='<2.6.0' # 2.5.x
13-
- ANSIBLE_VERSION='<2.5.0' # 2.4.x
11+
- ANSIBLE_GIT_VERSION='devel' # 2.8.x development branch
12+
- ANSIBLE_VERSION='<2.8.0' # 2.7.x
13+
- ANSIBLE_VERSION='<2.7.0' # 2.6.x
1414
install:
1515
- if [ "$ANSIBLE_GIT_VERSION" ]; then pip install "https://github.com/ansible/ansible/archive/${ANSIBLE_GIT_VERSION}.tar.gz";
16-
elif [ "$ANSIBLE_VERSION" ]; then pip install "ansible${ANSIBLE_VERSION}";
17-
else pip install ansible; fi;
18-
pip install jmespath
16+
else pip install "ansible${ANSIBLE_VERSION}"; fi;
17+
pip install --pre ansible-lint; pip install jmespath
1918
- ansible --version
20-
# The following is needed for default Ansible 2.3 installations
21-
- 'sudo mkdir -p /etc/ansible/roles && sudo chown $(whoami): /etc/ansible/roles'
2219
- ansible-galaxy install lae.travis-lxc
2320
- ansible-playbook tests/install.yml -i tests/inventory
2421
- git archive --format tar.gz HEAD > lae.proxmox.tar.gz && ansible-galaxy install
2522
lae.proxmox.tar.gz,$(git rev-parse HEAD),lae.proxmox && rm lae.proxmox.tar.gz
2623
before_script: cd tests/
2724
script:
25+
- ansible-lint ../ || true
2826
- ansible-playbook -i inventory deploy.yml --syntax-check
2927
- ansible-playbook -i inventory -v deploy.yml --skip skiponlxc
3028
- 'ANSIBLE_STDOUT_CALLBACK=debug unbuffer ansible-playbook --skip skiponlxc -vv
@@ -33,8 +31,7 @@ script:
3331
(echo "Idempotence: PASS"; exit 0) || (echo "Idempotence: FAIL"; exit 1)'
3432
- ANSIBLE_STDOUT_CALLBACK=debug ansible-playbook -i inventory -v test.yml
3533
notifications:
36-
webhooks: https://galaxy.ansible.com/api/v1/notifications/
37-
irc:
38-
on_success: change
39-
channels:
40-
secure: "uNnWy3ToabL7W4mP2jTqdbV3do408Sl4N53D9T3vvcpCOLrdHeSagq+Juto3q4Z2bF/zpwHp05y5pJU0N3Fsb4W1C2jUnGvbwEYFRK+cTUsMUT+rrcHByF2e/nMBi1GEPysGfXtNMlEIe+rlKNTCFvfngnp2lTmcs4QBtQh+eS1YQBr8mdizCDWi28FygMTma87VdQ10Af0XkXWHgVHYfh4MARGfkMmCWjZqBHaKV5xTZ7xVzndGN7T3XiehRnD44iQNT6PaYZFRqUWV8S8BROhwOZIlgwEX3t/gxiGKLOHoI/cubm2H8aKEhSMl18MUZxET7CK4vwVpEnlqTQihsLkkuM7zfvsUWEQA03ZsZDAAnnIykbfQDMVBexOfZwv/5xdX5qTy2aghr7c/+LUf8N86Hj+TDGfWBioNhuPYBj5lghw0a+p002kKjjmgr2tTZpghIdHzmRqjne2ZbcIH3lBMWftzDHtBxuUTAaxaGP75VqH0JF5lGUvZL49VPtb8tGff0BVi0+YuHdlDAoIL6ACC6qQlgyVEZhZ170QS0Ez9s+pkMa1rpj4BsxBKZog3TKEad4K+CcewarwCgCEGxG2S4E1ugeZoCVtP8Gr4CC/51axhbATCPqYSQnNXKXo6vP3Gw3VBOcKx/Ku8uR+Kcdj7oEoAcJRF5eZFMG1y5Wk="
34+
webhooks:
35+
urls:
36+
- https://galaxy.ansible.com/api/v1/notifications/
37+
- https://t2d.idolactiviti.es/notify

README.md

Lines changed: 75 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ lae.proxmox
77
Installs and configures a Proxmox 5.x cluster with the following features:
88

99
- Ensures all hosts can connect to one another as root
10-
- Ability to create/manage groups, users, and access control lists
10+
- Ability to create/manage groups, users, access control lists and storage
1111
- Ability to create or add nodes to a PVE cluster
1212
- IPMI watchdog support
1313
- BYO HTTPS certificate support
@@ -46,8 +46,6 @@ Copy the following playbook to a file like `install_proxmox.yml`:
4646

4747
Install this role and a role for configuring NTP:
4848

49-
# Changing ownership of the roles directory may be necessary:
50-
sudo chown $(whoami): /etc/ansible/roles
5149
ansible-galaxy install lae.proxmox geerlingguy.ntp
5250

5351
Now you can perform the installation:
@@ -64,6 +62,11 @@ file containing a list of hosts).
6462
Once complete, you should be able to access your Proxmox VE instance at
6563
`https://$SSH_HOST_FQDN:8006`.
6664

65+
## Support/Contributing
66+
67+
For support or if you'd like to contribute to this role but want guidance, feel
68+
free to join this Discord server: https://discord.gg/cjqr6Fg
69+
6770
## Deploying a fully-featured PVE 5.x cluster
6871

6972
Create a new playbook directory. We call ours `lab-cluster`. Our playbook will
@@ -167,6 +170,13 @@ pve_acls:
167170
- path: /
168171
roles: [ "Administrator" ]
169172
groups: [ "ops" ]
173+
pve_storages:
174+
- name: localdir
175+
type: dir
176+
content: [ "images", "iso", "backup" ]
177+
path: /plop
178+
maxfiles: 4
179+
170180
interfaces_template: "interfaces-{{ pve_group }}.j2"
171181
```
172182

@@ -201,6 +211,10 @@ are already in existing clusters with different names.
201211
must already exist) to access PVE and gives them the Administrator role as part
202212
of the `ops` group. Read the **User and ACL Management** section for more info.
203213

214+
`pve_storages` allows to create different types of storage and configure them.
215+
The backend needs to be supported by [Proxmox](https://pve.proxmox.com/pve-docs/chapter-pvesm.html).
216+
Read the **Storage Management** section for more info.
217+
204218
`interfaces_template` is set to the path of a template we'll use for configuring
205219
the network on these Debian machines. This is only necessary if you want to
206220
manage networking from Ansible rather than manually or via each host in PVE.
@@ -266,7 +280,7 @@ Finally, let's write our playbook. `site.yml` will look something like this:
266280
template:
267281
src: "{{ interfaces_template }}"
268282
dest: /etc/network/interfaces
269-
register: __configure_interfaces
283+
register: _configure_interfaces
270284
271285
- block:
272286
- name: Reboot for networking changes
@@ -277,7 +291,7 @@ Finally, let's write our playbook. `site.yml` will look something like this:
277291
- name: Wait for server to come back online
278292
wait_for_connection:
279293
delay: 15
280-
when: __configure_interfaces is changed
294+
when: _configure_interfaces is changed
281295
282296
- hosts: pve
283297
become: True
@@ -362,6 +376,7 @@ pve_repository_line: "deb http://download.proxmox.com/debian/pve stretch pve-no-
362376
pve_remove_subscription_warning: true # patches the subscription warning messages in proxmox if you are using the community edition
363377
pve_extra_packages: [] # Any extra packages you may want to install, e.g. ngrep
364378
pve_run_system_upgrades: false # Let role perform system upgrades
379+
pve_run_proxmox_upgrades: true # Let role perform Proxmox VE upgrades
365380
pve_check_for_kernel_update: true # Runs a script on the host to check kernel versions
366381
pve_reboot_on_kernel_update: false # If set to true, will automatically reboot the machine on kernel updates
367382
pve_remove_old_kernels: true # Currently removes kernel from main Debian repository
@@ -376,6 +391,7 @@ pve_zfs_enabled: no # Specifies whether or not to install and configure ZFS pack
376391
pve_ssl_letsencrypt: false # Specifies whether or not to obtain a SSL certificate using Let's Encrypt
377392
pve_groups: [] # List of group definitions to manage in PVE. See section on User Management.
378393
pve_users: [] # List of user definitions to manage in PVE. See section on User Management.
394+
pve_storages: [] # List of storages to manage in PVE. See section on Storage Management.
379395
```
380396

381397
To enable clustering with this role, configure the following variables appropriately:
@@ -465,15 +481,65 @@ pve_acls:
465481

466482
Refer to `library/proxmox_acl.py` [link][acl-module] for module documentation.
467483

484+
## Storage Management
485+
486+
You can use this role to manage storage within Proxmox VE (both in
487+
single server deployments and cluster deployments). For now, the only supported
488+
types are `dir`, `rbd`, `nfs`, `lvm` and `lvmthin`.
489+
Here are some examples.
490+
491+
```
492+
pve_storages:
493+
- name: dir1
494+
type: dir
495+
content: [ "images", "iso", "backup" ]
496+
path: /ploup
497+
disable: no
498+
maxfiles: 4
499+
- name: ceph1
500+
type: rbd
501+
content: [ "images", "rootdir" ]
502+
nodes: [ "lab-node01.local", "lab-node02.local" ]
503+
username: admin
504+
pool: rbd
505+
krbd: yes
506+
monhost:
507+
- 10.0.0.1
508+
- 10.0.0.2
509+
- 10.0.0.3
510+
- name: nfs1
511+
type: nfs
512+
content: [ "images", "iso" ]
513+
server: 192.168.122.2
514+
export: /data
515+
- name: lvm1
516+
type: lvm
517+
content: [ "images", "rootdir" ]
518+
vgname: vg1
519+
- name: lvmthin1
520+
type: lvmthin
521+
content: [ "images", "rootdir" ]
522+
vgname: vg2
523+
thinpool: data
524+
```
525+
526+
Refer to `library/proxmox_storage.py` [link][storage-module] for module
527+
documentation.
528+
468529
## Contributors
469530

470-
Musee Ullah ([@lae](https://github.com/lae), <[email protected]>)
471-
Engin Dumlu ([@roadrunner](https://github.com/roadrunner))
472-
Jonas Meurer ([@mejo-](https://github.com/mejo-))
531+
Musee Ullah ([@lae](https://github.com/lae), <[email protected]>)
532+
Engin Dumlu ([@roadrunner](https://github.com/roadrunner))
533+
Jonas Meurer ([@mejo-](https://github.com/mejo-))
534+
Ondrej Flider ([@SniperCZE](https://github.com/SniperCZE))
535+
niko2 ([@niko2](https://github.com/niko2))
536+
Christian Aublet ([@caublet](https://github.com/caublet))
537+
Fabien Brachere ([@Fbrachere](https://github.com/Fbrachere))
473538

474-
[pve-cluster]: https://pve.proxmox.com/wiki/Proxmox_VE_4.x_Cluster
539+
[pve-cluster]: https://pve.proxmox.com/wiki/Cluster_Manager
475540
[install-ansible]: http://docs.ansible.com/ansible/intro_installation.html
476541
[pvecm-network]: https://pve.proxmox.com/pve-docs/chapter-pvecm.html#_separate_cluster_network
477542
[user-module]: https://github.com/lae/ansible-role-proxmox/blob/master/library/proxmox_user.py
478543
[group-module]: https://github.com/lae/ansible-role-proxmox/blob/master/library/proxmox_group.py
479544
[acl-module]: https://github.com/lae/ansible-role-proxmox/blob/master/library/proxmox_group.py
545+
[storage-module]: https://github.com/lae/ansible-role-proxmox/blob/master/library/proxmox_storage.py

defaults/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ pve_check_for_kernel_update: true
99
pve_reboot_on_kernel_update: false
1010
pve_remove_old_kernels: true
1111
pve_run_system_upgrades: false
12+
pve_run_proxmox_upgrades: true
1213
pve_watchdog: none
1314
pve_watchdog_ipmi_action: power_cycle
1415
pve_watchdog_ipmi_timeout: 10
@@ -27,3 +28,4 @@ pve_ssl_letsencrypt: false
2728
pve_groups: []
2829
pve_users: []
2930
pve_acls: []
31+
pve_storages: []
File renamed without changes.

files/00_remove_checked_command_jessie.patch

Lines changed: 0 additions & 75 deletions
This file was deleted.

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

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)