Ansible role to deploy and configure Proxmox VE
enix.proxmox_ve =================
|❗ Deprecated | |:-------------| |Project moved to playbook-customers-platforms|
A role for deploying and configuring Proxmox VE on unix hosts using Ansible. This role is really tied to enix usage by configuring local LVM volumes, ISCSI multi-path, etc... So it is maybe not relevant to everyone, however every step is configurable so can be used independently
Requirements
Supported targets:
- Debian 11 "Bullseye" / Proxmox VE 7
- Debian 12 "Bookworm" / Proxmox VE 8
- Debian 13 "Trixie" / Proxmox VE 9
Role Variables
This roles comes preloaded with almost every available default. You can override each one in your hosts/group vars, in your inventory, or in your play. See the annotated defaults in defaults/main.yml for help in configuration. All provided variables start with proxmoxve_.
proxmoxveforcereboot- :warning: Caution :warning:. In case of important configuration changes this will automatically reboot the host. default: false.proxmoxve_enterprise- enable or not the enterprise subscription for Proxmox VE. default: false.proxmoxvedisablesmt- disable SMT (Hyperthreading) as a boot kernel option. See [https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/l1tf.html#smt-control] for details about associated flaws. default: false.proxmoxvenetovs- enable OpenVswitch network configuration on host, default: false.proxmoxvenettemplate- template used for/etc/network/interfacesconfiguration on the host, default: interfaces.j2. The path can be either changed or overloaded in your playbook. The default template only provide a basic bridge configuration.proxmoxvestoragelvm- description of lvm storage to initialise and configure in proxmox. exemple configuration above.proxmoxvestoragelvm_options- options to change in lvm.conf. default:none.proxmoxvestoragelvmdisableauto_activation- Disable lvm auto activation of volumes. Can be usefull on systems with lvm shared storage.proxmoxvestoragelvmeventactivation- Configure lvm event activation of volumes. Can be usefull to disable on systems with lvm shared storage.proxmoxvelvmglobalfilter- lvm globalfilter. default:[ "r|/dev/zd.|", "r|/dev/mapper/pve-.|" "r|/dev/mapper/.*-(vm|base)--[0-9]+--disk--[0-9]+|"].proxmoxvestorageiscsi- description of iscsi storage to configure in proxmox. exemple configuration above.proxmoxvestorageiscsi_options- options to change in iscsid.conf. default:
proxmoxvestorageiscsi_options:
- option: node.session.timeo.replacement_timeout
value: 10
state: present
proxmoxvespvuser- username with PVEAuditor role used for supervision. default:prometheus@pveproxmoxvespvpassword- password for supervision user. If not defined, no user is created.proxmoxvestorageiscsimultipathtemplate- template file to use for multipath configuration.proxmoxvemigrationsecure- Define security level of migrations. See [https://pve.proxmox.com/wiki/Manual:_datacenter.cfg]. default:true.proxmoxveclusterip- Ip to use for proxmox clustering. This will change/etc/hostsnode ip. default:ansibledefaultipv4.address.
Dependencies
- None
Clone this repo into your roles directory:
$ git clone https://gitlab.enix.org/ansible/ansible-proxmoxve.git roles/proxmoxve
Or use Ansible galaxy requirements.yml
# public role - src: enix.proxmox_ve name: proxmox_ve
And add it to your play's roles:
- hosts: all roles: - role: enix.proxmox_ve proxmoxvestorageiscsi: - name: iscsi-storage portal: 192.168.0.1 target: iqn.2015-11.com.storage:iscsi.12315132 volumes: - name: bigvolume wwid: 3600c0ff0003bb7fcb730e75a01000000 proxmoxvestoragelvm: - name: "localvm" devices: - /dev/md12 pesize: "128" shared: 0 - name: "iscsilvm" devices: - /dev/mapper/bigvolume pesize: "256" shared: 1 # saferemove option is optional. but saferemove_throughput options must be defined together otherwise will not be applied saferemove: 1 # 100MB/s saferemove_throughput: 104857600 proxmoxvestoragelvm_options: - option: issue_discards value: 0
You can also use the role as a playbook. You will be asked which hosts to provision, and you can further configure the play by using --extra-vars.
$ ansible-playbook -i inventory --extra-vars='{...}' main.yml
Still to do
- auto add hosts to clusters
- manage users and credentials
Changelog
4.0.0
Add Proxmox VE 9.0 / Debian Trixie Support Removed Proxmox VE 6.0 / Debian Buster Support
3.4.0
Add lldp package installation Fix issue with default ceph apt enterprise repository installation
3.3.0
Add lvm eventactivation and disableautovolumeactivation.
3.2.0
Add saferemove options to LVM storage configuration.
3.1.0
Add support for specific cluster ip.
3.0.0
Add Debian Bookworm and Proxmox VE 8.x branch support.
2.8.0
Add proxmoxvemigrationsecure option to disable secure migration mechanism if needed.
2.7.0
Add proxmoxvestoragelvm_options to setup options un lvm.conf.
2.6.0
Add Proxmox 7.0 / BullsEye support
2.5.0
Add creation of a supervision role user on the cluster
2.4.1
Update default multipath.conf to comply with debian buster changes (find_mulitpaths)
2.4.0
Update lvm global_filter to new 6.1 default value Depreciation fixes
2.3.0
Fix lvm issues Add iscsi configration options
2.2.0
Add proxmoxvedisablesmt option
2.1.1
Switch to enix.deb role_name
2.1.0
Allow override of lvm global_filter Add configuration of /etc/hosts
2.0.0
Now include automatic host reboot feature, proper storage manangement
1.0.0
First version that include basic storage configuration.
License
GPLv2
Author Information
Laurent CORBES