enix.proxmox_ve

enix.proxmox_ve

This is a role designed for setting up and configuring Proxmox VE on Unix systems using Ansible. It's tailored for enix users with features like local LVM volumes and ISCSI multi-path setup. However, you can customize each step, making it usable independently.

Requirements

Supported Operating Systems:

  • Debian 10 "Buster"
  • Debian 11 "Bullseye"
  • Debian 12 "Bookworm"

Role Variables

This role comes with many defaults that you can change in your host or group variables, inventory, or playbook. For help, check the defaults/main.yml file. All variables start with proxmox_ve__.

  • proxmox_ve__force_reboot: Caution! This will automatically restart the host if important changes are made. Default: false.
  • proxmox_ve__enterprise: Enables or disables the enterprise subscription for Proxmox VE. Default: false.
  • proxmox_ve__disable_smt: Disables SMT (Hyperthreading) at boot. For more info, see here. Default: false.
  • proxmox_ve__net_ovs: Enables OpenVswitch for network configuration. Default: false.
  • proxmox_ve__net_template: Template for configuring /etc/network/interfaces. Default: interfaces.j2 (provides basic bridge setup).
  • proxmox_ve__storage_lvm: The LVM storage description to set up in Proxmox. Check example configuration.
  • proxmox_ve__storage_lvm_options: Options to change in lvm.conf. Default: none.
  • proxmox_ve__lvm_global_filter: LVM global filter settings. Default:
    [ "r|/dev/zd.*|", "r|/dev/mapper/pve-.*|", "r|/dev/mapper/.*-(vm|base)--[0-9]+--disk--[0-9]+|"]
    
  • proxmox_ve__storage_iscsi: Description of iSCSI storage to configure in Proxmox. Check example configuration.
  • proxmox_ve__storage_iscsi_options: Options to change in iscsid.conf. Default:
    proxmox_ve__storage_iscsi_options:
      - option: node.session.timeo.replacement_timeout
        value: 10
        state: present
    
  • proxmox_ve__spv_user: The username for the PVEAuditor role used for supervision. Default: prometheus@pve.
  • proxmox_ve__spv_password: Password for supervision user (if not defined, no user will be created).
  • proxmox_ve__storage_iscsi_multipath_template: Template file for multipath configuration.
  • proxmox_ve__migration_secure: Defines migration security level. For more, see this page. Default: true.
  • proxmox_ve__cluster_ip: IP for Proxmox clustering, which will change the node IP in /etc/hosts. Default: ansible_default_ipv4.address.

Dependencies

  • None

Usage

To use this role, clone the repository into your roles directory:

$ git clone https://gitlab.enix.org/ansible/ansible-proxmox_ve.git roles/proxmox_ve

Or specify it in your Ansible galaxy requirements.yml file:

# public role
- src: enix.proxmox_ve
  name: proxmox_ve

Then add it to your play's roles:

- hosts: all
  roles:
    - role: enix.proxmox_ve
      proxmox_ve__storage_iscsi:
        - name: iscsi-storage
          portal: 192.168.0.1
          target: iqn.2015-11.com.storage:iscsi.12315132
          volumes:
            - name: bigvolume
              wwid: 3600c0ff0003bb7fcb730e75a01000000
      proxmox_ve__storage_lvm:
        - name: "localvm"
          devices:
            - /dev/md12
          pesize: "128"
          shared: 0
        - name: "iscsilvm"
          devices:
            - /dev/mapper/bigvolume
          pesize: "256"
          shared: 1
      proxmox_ve__storage_lvm_options:
        - option: issue_discards
          value: 0

You can also run it as a playbook, where you'll specify host provisioning and additional settings with --extra-vars.

$ ansible-playbook -i inventory --extra-vars='{...}' main.yml

Next Steps

  • Automatically add hosts to clusters
  • Manage user accounts and credentials

Changelog

3.1.0

  • Added support for specific cluster IP.

3.0.0

  • Added support for Debian Bookworm and Proxmox VE 8.x.

2.8.0

  • Added proxmox_ve__migration_secure to disable secure migration if desired.

2.7.0

  • Added proxmox_ve__storage_lvm_options for lvm.conf configuration.

2.6.0

  • Added support for Proxmox 7.0 / Bullseye.

2.5.0

  • Created a supervision role user on the cluster.

2.4.1

  • Updated default multipath.conf for Debian Buster compliance.

2.4.0

  • Updated lvm global_filter to the new default value.

2.3.0

  • Fixed LVM issues and added iSCSI configuration options.

2.2.0

  • Added option to disable SMT.

2.1.1

  • Changed to enix.deb role name.

2.1.0

  • Allowed overriding of lvm global_filter and configured /etc/hosts.

2.0.0

  • Introduced automatic host reboot and proper storage management.

1.0.0

  • Initial version with basic storage configuration.

License

GPLv2

Author Information

Laurent CORBES laurent.corbes@enix.fr - Enix Website

Informazioni sul progetto

Ansible role to deploy proxmox VE software

Installa
ansible-galaxy install enix.proxmox_ve
Licenza
Unknown
Download
475
Proprietario
Enix