{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/2051","repository_url":"https://api.github.com/repos/ansible/ansible-modules-extras","labels_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/2051/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/2051/comments","events_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/2051/events","html_url":"https://github.com/ansible/ansible-modules-extras/pull/2051","id":149067512,"number":2051,"title":"Adding `timedatectl` module for timezone etc setting.","user":{"login":"tmshn","id":3760893,"avatar_url":"https://avatars.githubusercontent.com/u/3760893?v=3","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},"labels":[{"url":"https://api.github.com/repos/ansible/ansible-modules-extras/labels/community_review","name":"community_review","color":"fad8c7"},{"url":"https://api.github.com/repos/ansible/ansible-modules-extras/labels/new_plugin","name":"new_plugin","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-18T07:33:18Z","updated_at":"2016-04-19T10:25:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/2051","html_url":"https://github.com/ansible/ansible-modules-extras/pull/2051","diff_url":"https://github.com/ansible/ansible-modules-extras/pull/2051.diff","patch_url":"https://github.com/ansible/ansible-modules-extras/pull/2051.patch"},"body":"##### ISSUE TYPE\r\n - New Module Pull Request\r\n\r\n##### COMPONENT NAME\r\n - timedatectl\r\n\r\n##### ANSIBLE VERSION\r\n```\r\nansible 2.1.0 (devel 3c3061378b) last updated 2016/04/18 09:57:34 (GMT +900)\r\n  lib/ansible/modules/core: (detached HEAD 795b3c25cd) last updated 2016/04/18 11:18:13 (GMT +900)\r\n  lib/ansible/modules/extras: (detached HEAD 05068630ca) last updated 2016/04/18 11:24:30 (GMT +900)\r\n  config file =\r\n  configured module search path = Default w/o overrides\r\n```\r\n\r\n##### SUMMARY\r\nThis module is used to configure timezone, time and/or NTP settings using the `timedatectl` command, which is much easier and safer than managing files in `/etc/`.\r\n\r\nWith the below task,\r\n```yaml\r\n  tasks:\r\n    # - name: install Japanese language pack\r\n    #   apt: name=language-pack-ja state=latest\r\n    - name: set timezone to JST\r\n      timedatectl: timezone='Asia/Tokyo' ntp=yes\r\n```\r\n\r\nThe verbose output at the first execution would be:\r\n```\r\nTASK [set timezone to JST] *****************************************************\r\ntask path: /Users/tmshn/Documents/vagrant/vagrant_playbook.yml:5\r\nchanged: [default] => {\"changed\": true, \"changelogs\": [{\"changed\": true, \"command\": \"timedatectl set-timezone Asia/Tokyo\", \"name\": \"Timezone\", \"new_value\": \"Asia/Tokyo (JST, +0900)\", \"old_value\": \"UTC (UTC, +0000)\"}, {\"changed\": false, \"command\": \"\", \"name\": \"NTP enabled\", \"new_value\": \"yes\", \"old_value\": \"yes\"}]}\r\n```\r\n\r\nThen, the output at the execution again would be:\r\n```\r\nTASK [set timezone to JST] *****************************************************\r\ntask path: /Users/tmshn/Documents/vagrant/vagrant_playbook.yml:5\r\nok: [default] => {\"changed\": false, \"changelogs\": [{\"changed\": false, \"command\": \"\", \"name\": \"Timezone\", \"new_value\": \"Asia/Tokyo (JST, +0900)\", \"old_value\": \"Asia/Tokyo (JST, +0900)\"}, {\"changed\": false, \"command\": \"\", \"name\": \"NTP enabled\", \"new_value\": \"yes\", \"old_value\": \"yes\"}]}\r\n```"},"comment":{"url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/comments/211846686","html_url":"https://github.com/ansible/ansible-modules-extras/pull/2051#issuecomment-211846686","issue_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/2051","id":211846686,"user":{"login":"gregdek","id":252125,"avatar_url":"https://avatars.githubusercontent.com/u/252125?v=3","gravatar_id":"","url":"https://api.github.com/users/gregdek","html_url":"https://github.com/gregdek","followers_url":"https://api.github.com/users/gregdek/followers","following_url":"https://api.github.com/users/gregdek/following{/other_user}","gists_url":"https://api.github.com/users/gregdek/gists{/gist_id}","starred_url":"https://api.github.com/users/gregdek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregdek/subscriptions","organizations_url":"https://api.github.com/users/gregdek/orgs","repos_url":"https://api.github.com/users/gregdek/repos","events_url":"https://api.github.com/users/gregdek/events{/privacy}","received_events_url":"https://api.github.com/users/gregdek/received_events","type":"User","site_admin":false},"created_at":"2016-04-19T10:25:10Z","updated_at":"2016-04-19T10:25:10Z","body":"Thanks @tmshn for this new module. When this module receives 'shipit' comments from two community members and any 'needs_revision' comments have been resolved, we will mark for inclusion.\n\n[This message brought to you by your friendly Ansibull-bot.]"}}