Use systemd module instead of command

This patch changes the use of systemctl via the command module
over to the Ansible systemd module.

One conditional check for systemd was removed since all supported
distributions deployed by OSA have systemd.

Change-Id: I926e94d185f4999e13b33f7d035b9dd5cf732f0b
This commit is contained in:
Major Hayden 2018-02-01 07:52:59 -06:00
parent 1f5e99871c
commit ad29910e6c
No known key found for this signature in database
GPG Key ID: 737051E0C1011FB1
3 changed files with 6 additions and 6 deletions

View File

@ -95,7 +95,8 @@
- rabbitmq-config
- name: Reload the systemd daemon
command: "systemctl daemon-reload"
systemd:
daemon_reload: yes
when:
- rabbitmq_server_service_added | changed
tags:

View File

@ -22,17 +22,15 @@
- rabbitmq_server-install
- name: Reload the systemd daemon
command: "systemctl daemon-reload"
systemd:
daemon_reload: yes
when:
- install_rabbitmq | changed
- ansible_service_mgr == 'systemd'
tags:
- rabbitmq-apt-packages
- rabbitmq-yum-packages
- rabbimtq-zypper-packages
- rabbitmq_server-install
# Avoid ANSIBLE0006 systemctl used in place of systemd module issue
- skip_ansible_lint
- name: Ensure there are no policy-rc files
file:

View File

@ -80,7 +80,8 @@
- rabbitmq-config
- name: Reload the systemd daemon
command: "systemctl daemon-reload"
systemd:
daemon_reload: yes
when:
- ansible_service_mgr == 'systemd'
- rabbit_resource_limit | changed