{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3395","repository_url":"https://api.github.com/repos/ansible/ansible-modules-core","labels_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3395/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3395/comments","events_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3395/events","html_url":"https://github.com/ansible/ansible-modules-core/pull/3395","id":147087093,"number":3395,"title":"Add `present` to `file`'s `state` attribute.","user":{"login":"supertylerc","id":4076147,"avatar_url":"https://avatars.githubusercontent.com/u/4076147?v=3","gravatar_id":"","url":"https://api.github.com/users/supertylerc","html_url":"https://github.com/supertylerc","followers_url":"https://api.github.com/users/supertylerc/followers","following_url":"https://api.github.com/users/supertylerc/following{/other_user}","gists_url":"https://api.github.com/users/supertylerc/gists{/gist_id}","starred_url":"https://api.github.com/users/supertylerc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/supertylerc/subscriptions","organizations_url":"https://api.github.com/users/supertylerc/orgs","repos_url":"https://api.github.com/users/supertylerc/repos","events_url":"https://api.github.com/users/supertylerc/events{/privacy}","received_events_url":"https://api.github.com/users/supertylerc/received_events","type":"User","site_admin":false},"labels":[{"id":132897290,"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/feature_pull_request","name":"feature_pull_request","color":"006b75","default":false},{"id":132897334,"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/needs_revision","name":"needs_revision","color":"eb6420","default":false},{"id":228501817,"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/pending_action","name":"pending_action","color":"e11d21","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-04-09T04:20:20Z","updated_at":"2016-12-09T19:54:32Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/pulls/3395","html_url":"https://github.com/ansible/ansible-modules-core/pull/3395","diff_url":"https://github.com/ansible/ansible-modules-core/pull/3395.diff","patch_url":"https://github.com/ansible/ansible-modules-core/pull/3395.patch"},"body":"##### ISSUE TYPE\n\nFeature Pull Request\n##### COMPONENT NAME\n\n`file`\n##### ANSIBLE VERSION\n\n```\nansible 2.0.1.0\n  config file =\n  configured module search path = Default w/o overrides\n```\n##### SUMMARY\n\nAdd a `present` value to the `file` module's `state` attribute.  This\nallows the `file` module to operate idempotently on files to ensure a\nfile exists without actually modifying it.\n\nFixes #170.\n###### Before\n\nUsing `state: touch`:\n\n```\n# First time\n       TASK: [example | Touch File] ****************************************\n       <localhost> REMOTE_MODULE file group=example state=touch path=/etc/foo.conf owner=example\n       changed: [localhost] => {\"changed\": true, \"dest\": \"/etc/foo.conf\", \"gid\": 1002, \"group\": \"example\", \"mode\": \"0600\", \"owner\": \"example\", \"size\": 0, \"state\": \"file\", \"uid\": 1002}\n\n# Second time\n       TASK: [example | Touch File] ****************************************\n       <localhost> REMOTE_MODULE file group=example state=touch path=/etc/foo.conf owner=example\n       changed: [localhost] => {\"changed\": true, \"dest\": \"/etc/foo.conf\", \"gid\": 1002, \"group\": \"example\", \"mode\": \"0600\", \"owner\": \"example\", \"size\": 0, \"state\": \"file\", \"uid\": 1002}\n```\n###### After\n\nUsing `state: present`\n\n```\n# First time\n       TASK: [example | Touch File] ****************************************\n       <localhost> REMOTE_MODULE file group=example state=present path=/etc/foo.conf owner=example\n       changed: [localhost] => {\"changed\": true, \"dest\": \"/etc/foo.conf\", \"gid\": 1002, \"group\": \"example\", \"mode\": \"0600\", \"owner\": \"example\", \"size\": 0, \"state\": \"file\", \"uid\": 1002}\n\n# Second time\n       TASK: [example | Touch File] ****************************************\n       <localhost> REMOTE_MODULE file group=example state=present path=/etc/foo.conf owner=example\n       ok: [localhost] => {\"changed\": false, \"dest\": \"/etc/foo.conf\", \"gid\": 1002, \"group\": \"example\", \"mode\": \"0600\", \"owner\": \"example\", \"size\": 0, \"state\": \"file\", \"uid\": 1002}\n```\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/comments/266107259","html_url":"https://github.com/ansible/ansible-modules-core/pull/3395#issuecomment-266107259","issue_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3395","id":266107259,"user":{"login":"ansibot","id":6585283,"avatar_url":"https://avatars.githubusercontent.com/u/6585283?v=3","gravatar_id":"","url":"https://api.github.com/users/ansibot","html_url":"https://github.com/ansibot","followers_url":"https://api.github.com/users/ansibot/followers","following_url":"https://api.github.com/users/ansibot/following{/other_user}","gists_url":"https://api.github.com/users/ansibot/gists{/gist_id}","starred_url":"https://api.github.com/users/ansibot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansibot/subscriptions","organizations_url":"https://api.github.com/users/ansibot/orgs","repos_url":"https://api.github.com/users/ansibot/repos","events_url":"https://api.github.com/users/ansibot/events{/privacy}","received_events_url":"https://api.github.com/users/ansibot/received_events","type":"User","site_admin":false},"created_at":"2016-12-09T19:54:32Z","updated_at":"2016-12-09T19:54:32Z","body":"This repository has been locked. All new issues and pull requests should be filed in https://github.com/ansible/ansible\n\nPlease read through the <a href=\"http://docs.ansible.com/ansible/dev_guide/repomerge.html#move-issues-and-prs-to-new-repo\">repomerge</a> page in the dev guide. The guide contains links to tools which automatically move your issue or pull request to the ansible/ansible repo.\n\n<!-- boilerplate: repomerge -->"}}
{"actor":{"display_login":"ansibot"}}