k9casca2/k3s-ansible-copia/roles/proxmox_lxc/handlers/main.yml
2025-04-08 11:18:50 +00:00

14 lines
486 B
YAML
Executable File

---
- name: Reboot containers
block:
- name: Get container ids from filtered files
ansible.builtin.set_fact:
proxmox_lxc_filtered_ids: >-
{{ proxmox_lxc_filtered_files | map("split", "/") | map("last") | map("split", ".") | map("first") }}
listen: reboot containers
- name: Reboot container
ansible.builtin.command: pct reboot {{ item }}
loop: "{{ proxmox_lxc_filtered_ids }}"
changed_when: true
listen: reboot containers