From fbe58d0ba681dd147af0d3578a7384290e0ea53e Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 10 Jan 2018 20:06:20 -0500 Subject: [PATCH] consolidate 3 commands w/ Ansible's systemd module --- roles/2-common/tasks/iiab-startup.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/roles/2-common/tasks/iiab-startup.yml b/roles/2-common/tasks/iiab-startup.yml index bdcb75e1c..a90a0cdb2 100644 --- a/roles/2-common/tasks/iiab-startup.yml +++ b/roles/2-common/tasks/iiab-startup.yml @@ -16,16 +16,13 @@ mode: 0755 when: not startup_unit.stat.exists -- name: Do a systemd daemon-reload +- name: Enable & restart the systemd service after daemon-reload # shell: systemctl daemon-reload - systemd: - daemon_reload: yes - when: not startup_unit.stat.exists - -- name: Enable & restart the systemd service # shell: systemctl restart iiab-startup.service # shell: systemctl enable iiab-startup.service - service: + systemd: + name: iiab-startup + daemon_reload: yes enabled: yes restarted: yes when: not startup_unit.stat.exists