homeserver/roles/mgrote.proxmox_lxc_profiles/tasks/profile.yml
mg 88a2d34183 k3s - Umzug Apps (#430)
## ToDo

- entfernte Apps ergänzen in Beschreibung

### Entfernt

- dozzle
- Photoprism
- hastebin

Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: #430
2022-11-24 16:24:21 +01:00

24 lines
776 B
YAML

---
- name: set apparmor profile
become: true
ansible.builtin.lineinfile:
path: "/etc/pve/lxc/{{ item.vmid }}.conf"
line: "lxc.apparmor.profile: {{ item.apparmor_profile }}"
state: present
register: restart
# schreibe vm id in die Liste "reboot"
- name: set reboot list
become: true
set_fact:
reboot:
- "{{ item.vmid }}"
when: restart.changed
# Füge die leere Liste "lists_merged" aus den defaults, mit der Liste "reboot" zusammen. Nur wenn auch etwas geändert wurde, daher "when:..."
- name: merge reboot lists
become: true
set_fact:
lists_merged: "{{ lists_merged + reboot }}"
when: restart.changed
# https://blog.crisp.se/2016/10/20/maxwenzin/how-to-append-to-lists-in-ansible