1.5 KiB
1.5 KiB
Home Server Ansible Configuration
This directory contains Ansible playbooks for managing the Proxmox home server environment.
Directory Structure
inventory/: Contains the inventory filehosts.iniwhere you define your servers.playbooks/: Contains the actual Ansible playbooks.ansible.cfg: Local Ansible configuration.requirements.yml: List of Ansible collections required.
Setup
-
Install Requirements:
ansible-galaxy install -r requirements.yml -
Configure Inventory: Edit
inventory/hosts.iniand update the following:ansible_host: The IP address of your Proxmox node.ansible_user: The SSH user (usually root).proxmox_api_*: Variables if you plan to use API-based modules in the future.
Note: Ensure you have SSH key access to your Proxmox node for passwordless login, or uncomment
ansible_ssh_pass.
Available Playbooks
Create Ubuntu Cloud Template (playbooks/create_ubuntu_template.yml)
This playbook downloads a generic Ubuntu 22.04 Cloud Image and converts it into a Proxmox VM Template.
Usage:
# Run the playbook
ansible-playbook playbooks/create_ubuntu_template.yml
Variables: You can override variables at runtime or by editing the playbook:
template_id: Default9000template_name: Defaultubuntu-2204-cloudstorage_pool: Defaultlocal-lvm
Example overriding variables:
ansible-playbook playbooks/create_ubuntu_template.yml -e "template_id=9001 template_name=my-custom-template"