Use systemd module instead of shell
Using ansible systemd module to daemon reload and service reload is the solution for the future. Let's embrace it! Change-Id: I808c72fbea6353da102f4d4569b446ec9fbe8df1 Signed-off-by: Jean-Philippe Evrard <jean-philippe.evrard@rackspace.co.uk>
This commit is contained in:
parent
ee0665f4a1
commit
a347dcb333
|
@ -14,15 +14,17 @@
|
|||
# limitations under the License.
|
||||
|
||||
- name: Restart Apache
|
||||
service:
|
||||
systemd:
|
||||
name: "apache2"
|
||||
state: "restarted"
|
||||
daemon_reload: yes
|
||||
register: apache_restart
|
||||
until: apache_restart|success
|
||||
retries: 5
|
||||
delay: 2
|
||||
|
||||
- name: Restart barbican services
|
||||
service:
|
||||
systemd:
|
||||
name: "{{ barbican_uwsgi_program_name }}"
|
||||
state: "restarted"
|
||||
|
||||
|
|
|
@ -44,10 +44,5 @@
|
|||
mode: "0644"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
register: systemd_init
|
||||
|
||||
- name: Reload the systemd daemon
|
||||
command: "systemctl daemon-reload"
|
||||
when: systemd_init | changed
|
||||
notify:
|
||||
- Restart barbican services
|
||||
|
|
Loading…
Reference in New Issue