boh, ha smesso di andare... non ci capisco un cazzo

This commit is contained in:
Freek Kettone 2025-09-03 18:13:04 +02:00
parent 2d82ebe140
commit 4906a4b734
8 changed files with 79 additions and 22 deletions

View file

@ -1,15 +1,12 @@
- name: Crea container lxc per prosody (xmpp)
hosts: proxmox_nodes
hosts: proxmox_nodes
gather_facts: false
vars:
root_password: "{{ lookup('env', 'XMPP_PASSWORD') }}"
ssh_public_key: "{{ lookup('file', '~/.ssh/ansible.pub') }}"
vmid: 121
tasks:
tasks:
- name: Create LXC
community.general.proxmox:
api_host: "{{ proxmox_url }}"
@ -29,8 +26,7 @@
features: "nesting=1"
state: present
delegate_to: localhost
register: lxc_creation_result #booooh, capiremo questo che vuol dire. Intanto registriamolo... immagino...
register: lxc_creation_result #booooh, capiremo questo che vuol dire. Intanto registriamolo... immagino...
- name: Start LXC container
community.general.proxmox:
@ -39,11 +35,10 @@
api_password: "{{ proxmox_password }}"
vmid: "{{ vmid }}"
node: milan
state: started # Tutto questo blocco è riassumibile in questa riga
state: started # Tutto questo blocco è riassumibile in questa riga
delegate_to: localhost
when: lxc_creation_result.changed
- name: Aggiungi container all'inventory dinamico
add_host:
name: xmpp01