{"action":"created","issue":{"url":"https://api.github.com/repos/alphagov/govuk-puppet/issues/3997","labels_url":"https://api.github.com/repos/alphagov/govuk-puppet/issues/3997/labels{/name}","comments_url":"https://api.github.com/repos/alphagov/govuk-puppet/issues/3997/comments","events_url":"https://api.github.com/repos/alphagov/govuk-puppet/issues/3997/events","html_url":"https://github.com/alphagov/govuk-puppet/pull/3997","id":128833636,"number":3997,"title":"Ensure service is stopped before removing script","user":{"login":"alexmuller","id":121219,"avatar_url":"https://avatars.githubusercontent.com/u/121219?v=3","gravatar_id":"","url":"https://api.github.com/users/alexmuller","html_url":"https://github.com/alexmuller","followers_url":"https://api.github.com/users/alexmuller/followers","following_url":"https://api.github.com/users/alexmuller/following{/other_user}","gists_url":"https://api.github.com/users/alexmuller/gists{/gist_id}","starred_url":"https://api.github.com/users/alexmuller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexmuller/subscriptions","organizations_url":"https://api.github.com/users/alexmuller/orgs","repos_url":"https://api.github.com/users/alexmuller/repos","events_url":"https://api.github.com/users/alexmuller/events{/privacy}","received_events_url":"https://api.github.com/users/alexmuller/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-26T14:22:01Z","updated_at":"2016-01-26T14:24:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/alphagov/govuk-puppet/pulls/3997","html_url":"https://github.com/alphagov/govuk-puppet/pull/3997","diff_url":"https://github.com/alphagov/govuk-puppet/pull/3997.diff","patch_url":"https://github.com/alphagov/govuk-puppet/pull/3997.patch"},"body":"The ordering arrow (`->`) that we added previously will apply changes in this order:\r\n\r\n1. `service` will schedule the stopping of the service. The scheduling will cause the service to be stopped at the end of this Puppet run.\r\n2. `file` resource will remove the init file.\r\n3. The stopped of the service that was scheduled in (1) will run and fail because the file resource has been removed.\r\n\r\nInstead of doing that, we can run an `exec` to stop the service manually (but only if it's running) and then remove the file after that command has executed."},"comment":{"url":"https://api.github.com/repos/alphagov/govuk-puppet/issues/comments/175040429","html_url":"https://github.com/alphagov/govuk-puppet/pull/3997#issuecomment-175040429","issue_url":"https://api.github.com/repos/alphagov/govuk-puppet/issues/3997","id":175040429,"user":{"login":"elliotcm","id":109225,"avatar_url":"https://avatars.githubusercontent.com/u/109225?v=3","gravatar_id":"","url":"https://api.github.com/users/elliotcm","html_url":"https://github.com/elliotcm","followers_url":"https://api.github.com/users/elliotcm/followers","following_url":"https://api.github.com/users/elliotcm/following{/other_user}","gists_url":"https://api.github.com/users/elliotcm/gists{/gist_id}","starred_url":"https://api.github.com/users/elliotcm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elliotcm/subscriptions","organizations_url":"https://api.github.com/users/elliotcm/orgs","repos_url":"https://api.github.com/users/elliotcm/repos","events_url":"https://api.github.com/users/elliotcm/events{/privacy}","received_events_url":"https://api.github.com/users/elliotcm/received_events","type":"User","site_admin":false},"created_at":"2016-01-26T14:24:52Z","updated_at":"2016-01-26T14:24:52Z","body":":+1: "}}