Repository navigation
References
See Ansible Control Node.
The Ansible Collections and their included custom modules and roles that are showcased.
- cloudcodger.assorted_apt collection roles.
- cloudcodger.proxmox_client collection roles.
- cloudcodger.proxmox_openssh collection roles.
- cloudcodger.proxmox_ve collection roles.
Cloud-init is the industry standard multi-distribution method for cross-platform cloud instance initialization. It is supported across all major public cloud providers, provisioning systems for private cloud infrastructure, and bare-metal installations.
PVE includes Cloud-init support that requires special Cloud-Init images.
The Homebrew package manager.
There are many ways to define Ansible variables used in playbooks. The local_aliases.yml files demonstrate a unique way of creating multiple playbooks that all run on localhost but require different values for the same variables. This is done by using aliases.
Notice how ansible_python_interpreter has been set to "{{ ansible_playbook_python }}" for localhost and to {{ lookup('env', 'VIRTUAL_ENV' ) }}/bin/python" for local_pve_remove (in lab-miminal). This shows two different ways to avoid a warning message about the auto selected interpreter when it isn't set. Setting this by referencing the VIRTUAL_ENV may not be the cleanest method but was left in here as an option and because it was the first method that was used in creating the showcase.
All of the alias hostnames start with local_ to emphasize the fact that they really reference localhost.
The How to build your inventory page contains the instructions on how to create a basic YAML file that will be called a static inventory file in this Wiki. To differenciate it from the dynamic inventory that uses a plugin.
The Organizing inventory in a directory describes this setup.
The group_vars and host_vars often found at the same level as the playbook are located in this directory. As well as dynamic and static inventory files.
The community.proxmox.proxmox dynamically reads the inventory from a PVE server. For a PVE cluster, this generates an inventory for the entire cluster.
PVE creates LXC containers from templates. These must already exist on the PVE node on which the CT is being created.
Canonical Multipass provides the ability to create an Ubuntu VM on a system running MacOS. It supports other host operating systems, but this showcase only looked at running it on a Mac.
Proxmox Virtual Environment (PVE).
The PVE UI is accessed by pointing a browser at the URL https://$YOURIPADDRESS:8006/. Where $YOURIPADDRESS is either a hostname, FQDN, or IP address. For example, https://gadget1:8006/ or https://192.168.6.220:8006/.
The showcase repository follows a numbering convention for the static VMIDs defined. For each CT or VM where a VMID is configured, the VMID is determined using the IP address of the guest machine. They all start with 6 (the third octet) followed by a 0 padded three digit number matching the forth octet. For example, the IP 192.168.6.8 becomes VMID 6008 and 192.168.6.61 becomes VMID 6061. For guest systems that use DHCP, the VMID is set to the next available number (starting at 100) that PVE finds available.
The VSCodium editor was used for this project in order to avoid telemetry data collected by the Microsoft propriatary Visual Studio Code. Any editor or integrated development environment (IDE) can be used in its place.
On a Mac, it can be installed using.
brew install --cask vscodium