{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/32048","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/32048/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/32048/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/32048/events","html_url":"https://github.com/ansible/ansible/issues/32048","id":267718932,"number":32048,"title":"timezone module fails to set timezone on FreeBSD","user":{"login":"zoni","id":145285,"avatar_url":"https://avatars1.githubusercontent.com/u/145285?v=4","gravatar_id":"","url":"https://api.github.com/users/zoni","html_url":"https://github.com/zoni","followers_url":"https://api.github.com/users/zoni/followers","following_url":"https://api.github.com/users/zoni/following{/other_user}","gists_url":"https://api.github.com/users/zoni/gists{/gist_id}","starred_url":"https://api.github.com/users/zoni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zoni/subscriptions","organizations_url":"https://api.github.com/users/zoni/orgs","repos_url":"https://api.github.com/users/zoni/repos","events_url":"https://api.github.com/users/zoni/events{/privacy}","received_events_url":"https://api.github.com/users/zoni/received_events","type":"User","site_admin":false},"labels":[{"id":454885231,"url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.3","name":"affects_2.3","color":"5319e7","default":false},{"id":562292166,"url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.4","name":"affects_2.4","color":"ededed","default":false},{"id":686214011,"url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.5","name":"affects_2.5","color":"ededed","default":false},{"id":48276055,"url":"https://api.github.com/repos/ansible/ansible/labels/bug_report","name":"bug_report","color":"fbca04","default":false},{"id":496359346,"url":"https://api.github.com/repos/ansible/ansible/labels/module","name":"module","color":"1d76db","default":false},{"id":636327968,"url":"https://api.github.com/repos/ansible/ansible/labels/support:community","name":"support:community","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-10-23T15:45:07Z","updated_at":"2018-02-26T08:47:58Z","closed_at":null,"author_association":"NONE","body":"##### ISSUE TYPE\r\n - Bug Report\r\n\r\n##### COMPONENT NAME\r\n\r\n`timezone` module\r\n\r\n##### ANSIBLE VERSION\r\n\r\n```\r\nansible 2.3.1.0\r\n  config file = \r\n  configured module search path = Default w/o overrides\r\n  python version = 2.7.12+ (default, Sep 17 2016, 12:08:02) [GCC 6.2.0 20160914]\r\n```\r\n\r\n(Bug exists on 2.4.0.0 and master as well)\r\n\r\n##### CONFIGURATION\r\n\r\nN/A\r\n\r\n##### OS / ENVIRONMENT\r\n\r\nFreeBSD (likely affects any version, confirmed on `10.3-RELEASE` and `11.1-RELEASE`)\r\n\r\n##### SUMMARY\r\n\r\nTimezone module fails to set correct timezone on FreeBSD machines and fails with an error (`Could not read /etc/localtime`).\r\n\r\nThis is caused by the timezone module assuming `/etc/localtime` to be a symlink to timezone files in `/usr/share/zoneinfo`, but (modern?) FreeBSD copies this file instead of symlinking it.\r\n\r\n##### STEPS TO REPRODUCE\r\n\r\nAttempt to set a timezone on FreeBSD using:\r\n\r\n```yaml\r\n- name: set system timezone\r\n  timezone:\r\n    name: UTC\r\n```\r\n\r\n##### EXPECTED RESULTS\r\n\r\nSystem clock successfully set to UTC.\r\n\r\n##### ACTUAL RESULTS\r\n\r\nAnsible fails with an error, does not set the correct timezone:\r\n\r\n```\r\nfatal: [some.host.tld]: FAILED! => {\r\n    \"changed\": false, \r\n    \"failed\": true, \r\n    \"invocation\": {\r\n        \"module_args\": {\r\n            \"hwclock\": null, \r\n            \"name\": \"UTC\"\r\n        }\r\n    }, \r\n    \"msg\": \"Could not read /etc/localtime\"\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/368429081","html_url":"https://github.com/ansible/ansible/issues/32048#issuecomment-368429081","issue_url":"https://api.github.com/repos/ansible/ansible/issues/32048","id":368429081,"user":{"login":"tmshn","id":3760893,"avatar_url":"https://avatars2.githubusercontent.com/u/3760893?v=4","gravatar_id":"","url":"https://api.github.com/users/tmshn","html_url":"https://github.com/tmshn","followers_url":"https://api.github.com/users/tmshn/followers","following_url":"https://api.github.com/users/tmshn/following{/other_user}","gists_url":"https://api.github.com/users/tmshn/gists{/gist_id}","starred_url":"https://api.github.com/users/tmshn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmshn/subscriptions","organizations_url":"https://api.github.com/users/tmshn/orgs","repos_url":"https://api.github.com/users/tmshn/repos","events_url":"https://api.github.com/users/tmshn/events{/privacy}","received_events_url":"https://api.github.com/users/tmshn/received_events","type":"User","site_admin":false},"created_at":"2018-02-26T08:47:58Z","updated_at":"2018-02-26T08:47:58Z","author_association":"CONTRIBUTOR","body":"@zoni I fixed this in #36715, so pls check out 👍 "}}
{"actor":{"display_login":"tmshn"}}