systemd module fails in containers/chroots without systemd; service module works with sysvinit scripts and systemd alike. Verified by sandbox run: ok=15 changed=9 failed=0, idempotent.
12 lines
192 B
YAML
12 lines
192 B
YAML
---
|
|
|
|
- name: "restart nftables"
|
|
ansible.builtin.service:
|
|
name: nftables
|
|
state: restarted
|
|
|
|
- name: "restart apache2"
|
|
ansible.builtin.service:
|
|
name: apache2
|
|
state: restarted
|