diff --git a/handlers/main.yml b/handlers/main.yml index 0345925..ad14b35 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -1,4 +1,6 @@ --- - name: restart rexray - command: rexray service restart + service: + name: rexray + state: restarted when: rexray_service diff --git a/tasks/main.yml b/tasks/main.yml index 2df749a..d2ff87a 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -8,5 +8,8 @@ - include: config.yml -- include: service.yml +- name: ensure rexray is running + service: + name: rexray + state: started when: rexray_service diff --git a/tasks/service.yml b/tasks/service.yml deleted file mode 100644 index 9666e6f..0000000 --- a/tasks/service.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- - -- name: Start REX-Ray service - command: rexray service start