From 8eae5bba63e2d6eba85e35e73d36bac374c1e718 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Wed, 28 Dec 2022 09:02:17 +0100 Subject: [PATCH] Use systemd module instead of command --- CHANGELOG.md | 3 ++- bind/handlers/main.yml | 4 +++- docker-host/handlers/main.yml | 3 ++- logstash/handlers/main.yml | 3 ++- postgresql/handlers/main.yml | 3 ++- varnish/handlers/main.yml | 3 ++- 6 files changed, 13 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3edf0dac..9396143e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,8 @@ The **patch** part changes is incremented if multiple releases happen the same m ### Changed -* Removed all "warn: False" args in command, shell and other modules as it's been depreciated and will give a hard fail in ansible-core 2.14.0. +* Use systemd module instead of command +* Removed all "warn: False" args in command, shell and other modules as it's been deprecated and will give a hard fail in ansible-core 2.14.0. ### Fixed diff --git a/bind/handlers/main.yml b/bind/handlers/main.yml index 8bb61a21..15b9d046 100644 --- a/bind/handlers/main.yml +++ b/bind/handlers/main.yml @@ -1,6 +1,8 @@ --- - name: reload systemd - command: systemctl daemon-reload + systemd: + daemon-reload: yes + - name: restart apparmor service: diff --git a/docker-host/handlers/main.yml b/docker-host/handlers/main.yml index 8b484b49..c21a84ef 100644 --- a/docker-host/handlers/main.yml +++ b/docker-host/handlers/main.yml @@ -1,6 +1,7 @@ --- - name: reload systemd - command: systemctl daemon-reload + systemd: + daemon-reload: yes - name: restart docker service: diff --git a/logstash/handlers/main.yml b/logstash/handlers/main.yml index d21d4de3..82021675 100644 --- a/logstash/handlers/main.yml +++ b/logstash/handlers/main.yml @@ -7,4 +7,5 @@ daemon_reload: yes - name: reload systemd - command: systemctl daemon-reload \ No newline at end of file + systemd: + daemon-reload: yes \ No newline at end of file diff --git a/postgresql/handlers/main.yml b/postgresql/handlers/main.yml index 5275b6a1..15a773dd 100644 --- a/postgresql/handlers/main.yml +++ b/postgresql/handlers/main.yml @@ -16,7 +16,8 @@ daemon_reload: yes - name: reload systemd - command: systemctl daemon-reload + systemd: + daemon-reload: yes - name: Restart minifirewall command: /etc/init.d/minifirewall restart diff --git a/varnish/handlers/main.yml b/varnish/handlers/main.yml index 7f9fd3ff..6e47bc10 100644 --- a/varnish/handlers/main.yml +++ b/varnish/handlers/main.yml @@ -12,7 +12,8 @@ daemon_reload: yes - name: reload systemd - command: systemctl daemon-reload + systemd: + daemon-reload: yes - name: restart munin-node service: