tobias_richter.proxmox

tobias_richter.proxmox

Build Status

This role sets up various parts of the Proxmox virtual environment:

  • Downloads LXC templates
  • Configures system settings (sysctl)
  • Applies special settings for LXC containers (e.g., allows zigbee stick and tinc VPN)
  • Sets up LDAP authentication domains
  • Configures temporary directory for zvdump
  • Sets up InfluxDB for monitoring
  • Configures Postfix for sending emails
  • Sets the DNS domain
  • Configures the nameserver

Requirements

This role needs Ansible version 2.7 or newer.

Role Variables

The available variables are listed below with their default values (see defaults/main.yml):

pve_templates: []
  #- debian-10.0-standard_10.0-1_amd64.tar.gz
  #- ubuntu-18.04-standard_18.04.1-1_amd64.tar.gz

This defines which templates to download.

pve_sysctl: []
  #- name: kernel.shmall
  #  value: 4194304
  #- name: kernel.shmmax
  #  value: 17179869184
  

Use this to configure system settings.

pve_ldap_domains: []
  #- name: "My name"
  #  password: "bind password"
  #  server: "ldap.corp"
  #  bind_dn: "uid=ldapbind,ou=users,dc=ldap,dc=corp"
  #  base_dn: "ou=users,dc=ldap,dc=corp"
  #  user_attr: "uid"
  #  default: 1
  #  secure: 1

Set up LDAP authentication domains.

pve_vzdump_tmpdir: /opt/vzdump-tmp

Path for the temporary directory for zvdump.

pve_lxc_config: []
#  - id: 111
#    options:
#      - name: lxc.cgroup.devices.allow
#        value: "c 10:200 rwm"
#        state: absent
#      - name: lxc.cap.keep
#        value: "sys_module mknod"
#        state: absent
#      - name: lxc.mount.entry
#        value: /dev/net/tun dev/net/tun none bind,create=file
#  - id: 117
#    options:
#      - name: lxc.cgroup.devices.allow
#        value: "c 166:* rwm"
#        state: present
#      - name: lxc.mount.entry
#        value: /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=file

Custom configurations for LXC containers. Check the commented lines for examples.

# pve_influxdb_port:
# pve_influxdb_host:

Set up InfluxDB for monitoring.

pve_dns_domain: local

Configure the DNS search domain.

pve_nameserver: 8.8.8.8

Set the primary nameserver (default is Google).

Example Playbook

This playbook shows how to download the LXC template for Debian 10 / Buster and apply settings to run GitLab in an LXC container.

- hosts: pve
  roles:
    - role: tobias_richter.proxmox
      # Prepare Debian template
      pve_templates:
        - debian-10.0-standard_10.0-1_amd64.tar.gz
      # Kernel settings for GitLab in LXC container
      pve_sysctl:
        - name: kernel.shmall
          value: 4194304
        - name: kernel.shmmax
          value: 17179869184
Informazioni sul progetto

Ansible Role for managing proxmox.

Installa
ansible-galaxy install tobias_richter.proxmox
Licenza
apache-2.0
Download
516
Proprietario
Expert DevOps Engineer