{"action":"closed","issue":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/90","labels_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/90/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/90/comments","events_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/90/events","html_url":"https://github.com/ansible/ansible-modules-core/issues/90","id":44521978,"number":90,"title":"service module does not enable correctly via update-rc.d ","user":{"login":"msolo","id":5078276,"avatar_url":"https://avatars.githubusercontent.com/u/5078276?v=3","gravatar_id":"","url":"https://api.github.com/users/msolo","html_url":"https://github.com/msolo","followers_url":"https://api.github.com/users/msolo/followers","following_url":"https://api.github.com/users/msolo/following{/other_user}","gists_url":"https://api.github.com/users/msolo/gists{/gist_id}","starred_url":"https://api.github.com/users/msolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msolo/subscriptions","organizations_url":"https://api.github.com/users/msolo/orgs","repos_url":"https://api.github.com/users/msolo/repos","events_url":"https://api.github.com/users/msolo/events{/privacy}","received_events_url":"https://api.github.com/users/msolo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/bug_report","name":"bug_report","color":"fbca04"},{"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/needs_info","name":"needs_info","color":"eb6420"},{"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/P3","name":"P3","color":"fef2c0"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-10-01T02:26:33Z","updated_at":"2015-03-09T05:20:45Z","closed_at":"2015-03-09T05:20:45Z","body":"##### Issue Type:\r\n\r\n“Bug Report”\r\n\r\n##### Ansible Version:\r\nansible 1.8\r\n\r\n##### Environment:\r\n\r\nUbuntu 13.10/14.04\r\n##### Summary:\r\n\r\nFix or remove the faulty change detection for update-rc.d based service enabling.\r\n\r\n##### Steps To Reproduce:\r\n\r\n    sudo apt-get install rrdcached\r\n\r\nCorrectly enabled after installation:\r\n\r\n    find /etc -iname '*rrdcached*' | sort\r\n    /etc/default/rrdcached\r\n    /etc/init.d/rrdcached\r\n    /etc/rc0.d/K20rrdcached\r\n    /etc/rc1.d/K20rrdcached\r\n    /etc/rc2.d/S20rrdcached\r\n    /etc/rc3.d/S20rrdcached\r\n    /etc/rc4.d/S20rrdcached\r\n    /etc/rc5.d/S20rrdcached\r\n    /etc/rc6.d/K20rrdcached\r\n\r\nDisable:\r\n\r\n    ansible localhost -s -m service -a \"name=rrdcached enabled=no\"\r\n    localhost | success >> {\r\n        \"changed\": true, \r\n        \"enabled\": false, \r\n        \"name\": \"rrdcached\"\r\n    }\r\n\r\nCorrectly disabled:\r\n\r\n    find /etc -iname '*rrdcached*' | sort\r\n    /etc/default/rrdcached\r\n    /etc/init.d/rrdcached\r\n    /etc/rc0.d/K20rrdcached\r\n    /etc/rc1.d/K20rrdcached\r\n    /etc/rc2.d/K80rrdcached\r\n    /etc/rc3.d/K80rrdcached\r\n    /etc/rc4.d/K80rrdcached\r\n    /etc/rc5.d/K80rrdcached\r\n    /etc/rc6.d/K20rrdcached\r\n\r\nRe-enable:\r\n\r\n    ansible localhost -s -m service -a \"name=rrdcached enabled=yes\"\r\n    localhost | success >> {\r\n        \"changed\": false, \r\n        \"enabled\": true, \r\n        \"name\": \"rrdcached\"\r\n    }\r\n\r\nNote: Changed is false, which is incorrect.\r\n\r\nIncorrect results on disk too:\r\n\r\n    find /etc -iname '*rrdcached*' | sort\r\n    /etc/default/rrdcached\r\n    /etc/init.d/rrdcached\r\n    /etc/rc0.d/K20rrdcached\r\n    /etc/rc1.d/K20rrdcached\r\n    /etc/rc2.d/K80rrdcached\r\n    /etc/rc3.d/K80rrdcached\r\n    /etc/rc4.d/K80rrdcached\r\n    /etc/rc5.d/K80rrdcached\r\n    /etc/rc6.d/K20rrdcached\r\n\r\n##### Expected Results:\r\n\r\n    find /etc -iname '*rrdcached*' | sort\r\n    /etc/default/rrdcached\r\n    /etc/init.d/rrdcached\r\n    /etc/rc0.d/K20rrdcached\r\n    /etc/rc1.d/K20rrdcached\r\n    /etc/rc2.d/S20rrdcached\r\n    /etc/rc3.d/S20rrdcached\r\n    /etc/rc4.d/S20rrdcached\r\n    /etc/rc5.d/S20rrdcached\r\n    /etc/rc6.d/K20rrdcached\r\n\r\n##### Actual Results:\r\n\r\n    find /etc -iname '*rrdcached*' | sort\r\n    /etc/default/rrdcached\r\n    /etc/init.d/rrdcached\r\n    /etc/rc0.d/K20rrdcached\r\n    /etc/rc1.d/K20rrdcached\r\n    /etc/rc2.d/K80rrdcached\r\n    /etc/rc3.d/K80rrdcached\r\n    /etc/rc4.d/K80rrdcached\r\n    /etc/rc5.d/K80rrdcached\r\n    /etc/rc6.d/K20rrdcached\r\n"}}