proxmox ansible bootstrapping

This commit is contained in:
plasmagoat 2025-06-07 19:41:15 +02:00
parent 2d1a363a50
commit bdf3bc6b02
20 changed files with 481 additions and 4 deletions

35
group_vars/README.md Normal file
View file

@ -0,0 +1,35 @@
### Ansible Vault usage
````markdown
# Using Ansible Vault for secrets
- Create vault file (only once):
```bash
ansible-vault create group_vars/proxmox/vault.yml
````
* Edit vault file:
```bash
ansible-vault edit group_vars/proxmox/vault.yml
```
* Vault file supports nested YAML structures.
* Run playbooks with vault password prompt:
```bash
ansible-playbook bootstrap.yml --ask-vault-pass
```
* Or provide a password file:
```bash
ansible-playbook bootstrap.yml --vault-password-file ~/.vault_pass.txt
```
* Access secrets in playbooks as normal variables, e.g.:
```yaml
{{ proxmox.root_password }}
```

View file

@ -0,0 +1,25 @@
# Proxmox specific variables
proxmox_enterprise_repo_enabled: false # Set to true if you have a Proxmox subscription
proxmox_no_subscription_repo_enabled: true
proxmox_pve_version: "8.4.1" # Adjust as needed
# Proxmox Network Configuration
proxmox_network_ip: "192.168.1.100"
proxmox_network_cidr: "24"
proxmox_network_gateway: "192.168.1.1"
proxmox_physical_nic: "eno1" # Main NIC for vmbr0
# General system-wide variables
admin:
name: "plasmagoat"
groups: ["sudo"]
shell: /bin/bash
ssh_keys:
- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICUP7m8jZJiclZGfSje8CeBYFhX10SrdtjYziuChmj1X plasmagoat@macbook-air"
ci_user:
name: forgejo-runner
groups: ["sudo"]
shell: /bin/bash
ssh_keys:
- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGlzZWik5bbH6/xjiCpwo1SQSJ/J/Cv7y4ZQ45P68GLB forgejo-runner"

View file

@ -0,0 +1,7 @@
$ANSIBLE_VAULT;1.1;AES256
61313964636437313765633263626265306663373866616265393463383838616130373639373037
6261666639613636363666626635353636343439663263320a303137653761646664633463376466
62616630306332373862653838376563623465393130386536383666616133656538306336666165
3430373162633736610a633864623662366536353436343235353764386664376662363138376435
66633337393735633539303565663634333635366462386465313739613762613932643231656437
3464393961663935373964623432383834643263353230313333