2021-10-10 16:47:36 +02:00
|
|
|
---
|
|
|
|
- name: restart lxc
|
|
|
|
become: true
|
2021-10-13 12:20:26 +02:00
|
|
|
command: "pct reboot {{ item }}"
|
2021-10-10 16:47:36 +02:00
|
|
|
failed_when: false
|
2021-10-13 12:20:26 +02:00
|
|
|
loop: "{{ lists_merged | unique }}"
|
|
|
|
# reboote den lxc wenn:
|
|
|
|
# - er in der Liste "Lists merged" vorhanden ist
|
|
|
|
# unique Filter sorgt dafür das es keine doppelten Elemente gibt
|
|
|
|
# https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#set-theory-filters
|
|
|
|
# https://www.reddit.com/r/ansible/comments/8cp86c/how_do_i_remove_duplicate_items_from_a_variable/
|