Move container restart task to handlers.

This commit is contained in:
Andreas B. Mundt 2021-11-12 20:23:58 +01:00 committed by Andreas B. Mundt
parent fcb2e99cc5
commit 85836e311e
2 changed files with 17 additions and 8 deletions

View file

@ -0,0 +1,7 @@
- name: enable and restart containers
systemd:
name: systemd-nspawn@{{ contname }}{{ "%02d" | format(item|int) }}.service
state: restarted
enabled: yes
loop: "{{ containers }}"
listen: enable and restart containers