{"action":"closed","issue":{"url":"https://api.github.com/repos/geerlingguy/ansible-role-gitlab/issues/8","labels_url":"https://api.github.com/repos/geerlingguy/ansible-role-gitlab/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/geerlingguy/ansible-role-gitlab/issues/8/comments","events_url":"https://api.github.com/repos/geerlingguy/ansible-role-gitlab/issues/8/events","html_url":"https://github.com/geerlingguy/ansible-role-gitlab/issues/8","id":59398339,"number":8,"title":"Handler 'restart gitlab' ignores error","user":{"login":"bradfirj","id":3495954,"avatar_url":"https://avatars.githubusercontent.com/u/3495954?v=3","gravatar_id":"","url":"https://api.github.com/users/bradfirj","html_url":"https://github.com/bradfirj","followers_url":"https://api.github.com/users/bradfirj/followers","following_url":"https://api.github.com/users/bradfirj/following{/other_user}","gists_url":"https://api.github.com/users/bradfirj/gists{/gist_id}","starred_url":"https://api.github.com/users/bradfirj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradfirj/subscriptions","organizations_url":"https://api.github.com/users/bradfirj/orgs","repos_url":"https://api.github.com/users/bradfirj/repos","events_url":"https://api.github.com/users/bradfirj/events{/privacy}","received_events_url":"https://api.github.com/users/bradfirj/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-01T14:45:46Z","updated_at":"2015-08-13T20:31:07Z","closed_at":"2015-08-13T20:31:07Z","body":"The `failed_when: false` line in the reconfigure handler is suppressing all errors in the `gitlab-ctl reconfigure` process. This isn't something that should be allowed to fail silently so I assume this was added for testing purposes and forgotten about?\r\n\r\nI ran into this while drastically expanding the gitlab.rb.j2 template, and going back after adding 20 or 30 options only to discover that all my passing tests had in fact been failing.\r\n\r\nWith an intentionally malformed template file, here's the result of running the handler with the existing code:\r\n```\r\nNOTIFIED: [ansible-role-gitlab | restart gitlab] ****************************** \r\nchanged: [172.16.6.189] => {\"changed\": true, \"cmd\": [\"gitlab-ctl\", \"reconfigure\"], \"delta\": \"0:00:04.656031\", \"end\": \"2015-03-01 14:38:38.925464\", \"failed\": false, \"failed_when_result\": false, \"rc\": 1, \"start\": \"2015-03-01 14:38:34.269433\", \"stderr\":  ...... snipped ..... \", \"stdout\": .....snipped.....\", \"warnings\": []}\r\n```\r\nWithout including the large amount of failure text in stdout, it's clear that when the return code is non-zero the role shouldn't be marking the step as changed successfully.\r\n\r\nIf there was a good reason for suppressing any warnings from gitlab-ctl please ignore.\r\n"}}