{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/45205","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/45205/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/45205/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/45205/events","html_url":"https://github.com/ansible/ansible/issues/45205","id":357098779,"node_id":"MDU6SXNzdWUzNTcwOTg3Nzk=","number":45205,"title":"Hostname module on Raspbian Stretch fails, while it is working on Jessie","user":{"login":"stefan-wegener","id":5695658,"node_id":"MDQ6VXNlcjU2OTU2NTg=","avatar_url":"https://avatars1.githubusercontent.com/u/5695658?v=4","gravatar_id":"","url":"https://api.github.com/users/stefan-wegener","html_url":"https://github.com/stefan-wegener","followers_url":"https://api.github.com/users/stefan-wegener/followers","following_url":"https://api.github.com/users/stefan-wegener/following{/other_user}","gists_url":"https://api.github.com/users/stefan-wegener/gists{/gist_id}","starred_url":"https://api.github.com/users/stefan-wegener/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefan-wegener/subscriptions","organizations_url":"https://api.github.com/users/stefan-wegener/orgs","repos_url":"https://api.github.com/users/stefan-wegener/repos","events_url":"https://api.github.com/users/stefan-wegener/events{/privacy}","received_events_url":"https://api.github.com/users/stefan-wegener/received_events","type":"User","site_admin":false},"labels":[{"id":835286067,"node_id":"MDU6TGFiZWw4MzUyODYwNjc=","url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.6","name":"affects_2.6","color":"ededed","default":false},{"id":785271699,"node_id":"MDU6TGFiZWw3ODUyNzE2OTk=","url":"https://api.github.com/repos/ansible/ansible/labels/bug","name":"bug","color":"fbca04","default":true},{"id":496359346,"node_id":"MDU6TGFiZWw0OTYzNTkzNDY=","url":"https://api.github.com/repos/ansible/ansible/labels/module","name":"module","color":"1d76db","default":false},{"id":636352796,"node_id":"MDU6TGFiZWw2MzYzNTI3OTY=","url":"https://api.github.com/repos/ansible/ansible/labels/support:core","name":"support:core","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-09-05T07:27:03Z","updated_at":"2018-09-15T15:06:18Z","closed_at":null,"author_association":"NONE","body":"##### SUMMARY\r\nWhen running the [hostname module](https://docs.ansible.com/ansible/2.5/modules/hostname_module.html) (of course with the `become: true` setting) on a Raspbian stretch inventory host, it fails with:\r\n\r\n```\r\n\"msg\": \"Command failed rc=1, out=, err=Could not set property: Access denied\".\r\n```\r\n\r\nRunning exactly the same on a Raspbian Jessie inventory host changes the hostname as expected.\r\n\r\n##### ISSUE TYPE\r\n- Bug Report\r\n\r\n##### COMPONENT NAME\r\nhostname module\r\n\r\n##### ANSIBLE VERSION\r\n```paste below\r\nansible 2.6.1\r\n  config file = /etc/ansible/ansible.cfg\r\n  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /usr/lib/python2.7/site-packages/ansible\r\n  executable location = /usr/bin/ansible\r\n  python version = 2.7.5 (default, Jul 13 2018, 13:06:57) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]\r\n\r\n```\r\n\r\n##### CONFIGURATION\r\n```paste below\r\n\r\n```\r\n\r\n##### OS / ENVIRONMENT\r\nWhen gathering facts, the Stretch systems outputs:\r\n\"ansible_distribution_release\": \"stretch\",\r\n\"ansible_os_family\": \"Debian\",\r\n\r\nThe jessie system outputs:\r\n \"ansible_distribution_release\": \"jessie\",\r\n\"ansible_os_family\": \"Debian\",\r\n\r\nMy ansible instance is living in the awx_task container with version 1.0.6.41.\r\n\r\n##### STEPS TO REPRODUCE\r\nThe command that fails is:\r\n```yaml\r\n- name: Set hostname\r\n  hostname:\r\n    name: \"{{ pi_target_name }}\"\r\n  become: true\r\n```\r\n\r\n##### EXPECTED RESULTS\r\nThe change of the hostname should behave similar on Jessie and Stretch releases\r\n\r\n##### ACTUAL RESULTS\r\nThe command fails on Stretch hosts\r\n\r\n<!--- Paste verbatim command output between quotes -->\r\n```paste below\r\n{\r\n    \"_ansible_parsed\": true,\r\n    \"invocation\": {\r\n        \"module_args\": {\r\n            \"name\": \"pi-dev29\"\r\n        }\r\n    },\r\n    \"changed\": false,\r\n    \"_ansible_no_log\": false,\r\n    \"msg\": \"Command failed rc=1, out=, err=Could not set property: Access denied\\n\"\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/421583821","html_url":"https://github.com/ansible/ansible/issues/45205#issuecomment-421583821","issue_url":"https://api.github.com/repos/ansible/ansible/issues/45205","id":421583821,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMTU4MzgyMQ==","user":{"login":"mscherer","id":230335,"node_id":"MDQ6VXNlcjIzMDMzNQ==","avatar_url":"https://avatars0.githubusercontent.com/u/230335?v=4","gravatar_id":"","url":"https://api.github.com/users/mscherer","html_url":"https://github.com/mscherer","followers_url":"https://api.github.com/users/mscherer/followers","following_url":"https://api.github.com/users/mscherer/following{/other_user}","gists_url":"https://api.github.com/users/mscherer/gists{/gist_id}","starred_url":"https://api.github.com/users/mscherer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mscherer/subscriptions","organizations_url":"https://api.github.com/users/mscherer/orgs","repos_url":"https://api.github.com/users/mscherer/repos","events_url":"https://api.github.com/users/mscherer/events{/privacy}","received_events_url":"https://api.github.com/users/mscherer/received_events","type":"User","site_admin":false},"created_at":"2018-09-15T15:06:18Z","updated_at":"2018-09-15T15:06:18Z","author_association":"CONTRIBUTOR","body":"This use \"hostnamectl set-hostname\", can you try to run it manually, do you have anything in the logs ?"}}
{"actor":{"display_login":"mscherer"}}