From 65a9908cf1613cd51c98209fbba296aeb278fd5b Mon Sep 17 00:00:00 2001 From: Florian Touya Date: Sun, 20 Nov 2016 18:48:44 +0100 Subject: [PATCH] Add privileges escalation on php7 restart handler I had an access denied exception when ansible tried to restart php7 fpm ``` RUNNING HANDLER [itcraftsmanpl.php7 : restart php7-fpm] ************************ fatal: [127.0.0.1]: FAILED! => {"changed": false, "failed": true, "msg": "Unable to restart service php7.0-fpm: Failed to restart php7.0-fpm.service: Access denied\n"} ``` --- handlers/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/handlers/main.yml b/handlers/main.yml index 5de5e66..2729e87 100755 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -1,3 +1,4 @@ --- - name: restart php7-fpm service: name=php7.0-fpm enabled=yes state=restarted + become: yes