From f51d1773a28a4ed65b0eb8bab95111654eaae0ee Mon Sep 17 00:00:00 2001 From: Travis Rhoden Date: Thu, 4 Feb 2016 09:26:33 -0700 Subject: [PATCH] Use the 'service' module for rexray service Instead of "rexray service ...", rely on the OS to start the service through it's init system. --- handlers/main.yml | 4 +++- tasks/main.yml | 5 ++++- tasks/service.yml | 4 ---- 3 files changed, 7 insertions(+), 6 deletions(-) delete mode 100644 tasks/service.yml 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