Files
home-server/ansible/playbooks/hello_world_provision.yml

34 lines
1.0 KiB
YAML

---
- name: Hello World Provisioning
hosts: localhost # Run API calls from control node
gather_facts: no
vars_files:
- "../inventory/hosts.ini" # Load connection details if needed manually, OR rely on inventory
vars:
# Target Proxmox Details (override from inventory/extra vars)
proxmox_api_host: "192.168.50.100"
proxmox_api_user: "root@pam"
proxmox_api_password: "Hemroid8" # Consider moving to Vault!
proxmox_node: "mercury"
# VM Spec
vmid: 101
vm_name: "hello-world-vm"
template_name: "ubuntu-2204-cloud"
ci_user: "ubuntu"
# Replace with your actual public key or pass via -e "ssh_key=..."
ssh_keys:
- "{{ ssh_key | default('ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI...') }}"
tasks:
- name: Run Proxmox Provision Role
include_role:
name: proxmox_provision
vars:
vmid: "{{ vmid }}"
vm_name: "{{ vm_name }}"
template_name: "{{ template_name }}"
ci_user: "{{ ci_user }}"
ssh_keys: "{{ ssh_keys }}"