Merge pull request #4 from phahulin/master

Restart poa-netstats only if it exists
This commit is contained in:
phahulin 2018-01-09 15:53:15 +03:00 committed by GitHub
commit 0e80c40462
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -1,6 +1,12 @@
---
- name: Check that the netstats service is installed
stat:
path: /etc/systemd/system/poa-netstats.service
register: netstats_service_file
- name: Shutdown poa-netstats service
service: name=poa-netstats state=stopped
when: netstats_service_file.stat.exists
- name: Shutdown poa-parity service
service: name=poa-parity state=stopped
@ -21,3 +27,4 @@
- name: Launch poa-netstats service
service: name=poa-netstats state=started
when: netstats_service_file.stat.exists