tenhishadow.pve_on_debian
Proxmox VE Installation on Debian
Source
- The information is based on this article: HABRAHABR.
Introduction
This setup will install Proxmox Virtual Environment (VE) on a Debian system. It automates the process described here: Proxmox VE Installation Guide and adds some configurations to make the system work better (like setting up journald and chronyd). It is designed to work with all versions of Debian and Proxmox, but note that I haven't tested it on all versions.
You can change the default settings in your playbook for different versions:
debian_version
debian_repo
pve_repo_keyurl
pve_repo_keyring
Initially, the role will perform all tasks from the Proxmox installation guide except for installing open-iscsi
, as I do not use it and it can cause warnings if not set up properly.
During the process, the role will also set up a network bridge for virtual machines (the default is vmbr0
). You can easily change this by modifying the templates/interfaces.j2
file.
Requirements
- Ansible (Tested with version 2.3.1.0)
- Python (Tested with version 2.7.5)
Role Variables
Here’s a list of adjustable variables for this role. These variables can be found in defaults/main.yml
, vars/main.yml
, or can be declared in your playbook:
defaults/main.yml:
ntp_pool: pool.ntp.org # NTP server pool
timezone: Europe/Moscow # Default timezone
debian_version: stretch # Default Debian version
debian_repo: "http://mirror.yandex.ru/debian/" # Default repository URL
add_pve-no-subscription: True # Include pve-no-subscription repo
disable_pve-enterprise: True # Disable the enterprise repo
pve_repo_keyurl # Repository key URL
pve_repo_keyring # GPG keyring
Playbook Variables (must be defined):
proxmox_ip # IP address for the new Proxmox instance
proxmox_mask # Network mask
proxmox_gateway # Default gateway
proxmox_physnet # Physical network for the bridge (e.g., eth0)
proxmox_bridge # Name of the virtual bridge (e.g., vmbr0)
proxmox_hostname_fdqn # Fully qualified domain name for new Proxmox instance
Dependencies
Include any other roles you might need from Galaxy and note any specific parameters for those roles.
Example Playbook
Here’s a sample playbook you can use:
---
- hosts: proxmox_target
gather_facts: true
vars:
proxmox_physnet: eth0
proxmox_bridge: vmbr0
proxmox_ip: 192.168.102.51
proxmox_mask: 255.255.255.0
proxmox_gateway: 192.168.102.1
proxmox_hostname_fdqn: proxmox.testlab.lan
roles:
- tenhishadow.pve_on_debian
...
License
This project is licensed under GPL v 3.0.
Author Information
- Website: tenhi.online
- Email: adm@tenhi.ru
ansible-galaxy install tenhishadow.pve_on_debian