From 0879f1f32dc11d0723264b175d11b4e932e36b14 Mon Sep 17 00:00:00 2001 From: Jose Eduardo Date: Sun, 18 Dec 2016 16:52:36 +0000 Subject: [PATCH] Superuser needed for restart/reload --- handlers/main.yml | 2 ++ tasks/configure.yml | 1 + 2 files changed, 3 insertions(+) diff --git a/handlers/main.yml b/handlers/main.yml index 64cef31..3747804 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -4,7 +4,9 @@ - name: wsgi restart service: name={{item.name}}-wsgi state=restarted with_items: "{{wsgi_applications}}" + become: yes - name: wsgi reload service: name={{item.name}}-wsgi state=reloaded with_items: "{{wsgi_applications}}" + become: yes diff --git a/tasks/configure.yml b/tasks/configure.yml index 975654b..ecdb625 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -32,5 +32,6 @@ - name: Ensure that the services are started service: name={{item.name}}-wsgi state=started enabled=yes + become: yes ignore_errors: yes with_items: "{{wsgi_applications}}"