{"action":"created","comment":{"url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/pulls/comments/151840853","pull_request_review_id":77619233,"id":151840853,"diff_hunk":"@@ -96,23 +96,19 @@ def hashivault_write(params):\n     data = params.get('data')\n     with warnings.catch_warnings():\n         warnings.simplefilter(\"ignore\")\n-        if params.get('update'):\n-            read_data = client.read(secret)\n-            if read_data and 'data' in read_data:\n-                write_data  = read_data['data']\n-            else:\n-                write_data  = {}\n-            write_data.update(data)\n-            returned_data = client.write((secret), **write_data)\n-            if returned_data:\n-                result['data'] = returned_data\n-            result['msg'] = \"Secret %s updated\" % secret\n+        read_data = client.read(secret)","path":"ansible/modules/hashivault/hashivault_write.py","position":24,"original_position":24,"commit_id":"6653d3885a0d8ec35fd7424e67b168cec7e8a1cf","original_commit_id":"6653d3885a0d8ec35fd7424e67b168cec7e8a1cf","user":{"login":"TerryHowe","id":104113,"avatar_url":"https://avatars2.githubusercontent.com/u/104113?v=4","gravatar_id":"","url":"https://api.github.com/users/TerryHowe","html_url":"https://github.com/TerryHowe","followers_url":"https://api.github.com/users/TerryHowe/followers","following_url":"https://api.github.com/users/TerryHowe/following{/other_user}","gists_url":"https://api.github.com/users/TerryHowe/gists{/gist_id}","starred_url":"https://api.github.com/users/TerryHowe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TerryHowe/subscriptions","organizations_url":"https://api.github.com/users/TerryHowe/orgs","repos_url":"https://api.github.com/users/TerryHowe/repos","events_url":"https://api.github.com/users/TerryHowe/events{/privacy}","received_events_url":"https://api.github.com/users/TerryHowe/received_events","type":"User","site_admin":false},"body":"My concern here is now hashivault_write is going to read even for the cases where update is not set","created_at":"2017-11-18T16:12:30Z","updated_at":"2017-11-18T16:12:30Z","html_url":"https://github.com/TerryHowe/ansible-modules-hashivault/pull/38#discussion_r151840853","pull_request_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/pulls/38","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/pulls/comments/151840853"},"html":{"href":"https://github.com/TerryHowe/ansible-modules-hashivault/pull/38#discussion_r151840853"},"pull_request":{"href":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/pulls/38"}}},"pull_request":{"url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/pulls/38","id":152289265,"html_url":"https://github.com/TerryHowe/ansible-modules-hashivault/pull/38","diff_url":"https://github.com/TerryHowe/ansible-modules-hashivault/pull/38.diff","patch_url":"https://github.com/TerryHowe/ansible-modules-hashivault/pull/38.patch","issue_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/issues/38","number":38,"state":"open","locked":false,"title":"Changed flag support for hashivault_write","user":{"login":"jyrivallan","id":4697954,"avatar_url":"https://avatars0.githubusercontent.com/u/4697954?v=4","gravatar_id":"","url":"https://api.github.com/users/jyrivallan","html_url":"https://github.com/jyrivallan","followers_url":"https://api.github.com/users/jyrivallan/followers","following_url":"https://api.github.com/users/jyrivallan/following{/other_user}","gists_url":"https://api.github.com/users/jyrivallan/gists{/gist_id}","starred_url":"https://api.github.com/users/jyrivallan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jyrivallan/subscriptions","organizations_url":"https://api.github.com/users/jyrivallan/orgs","repos_url":"https://api.github.com/users/jyrivallan/repos","events_url":"https://api.github.com/users/jyrivallan/events{/privacy}","received_events_url":"https://api.github.com/users/jyrivallan/received_events","type":"User","site_admin":false},"body":"#### `changed` flag support for the `hashivault_write` task\r\n\r\nI'd like to be able to track what was already inside vault before the launch of my playbooks...\r\nI also refactored the method a bit.\r\n\r\nHTH","created_at":"2017-11-13T16:47:04Z","updated_at":"2017-11-18T16:12:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5e23bf205971d715ec4f6340939a0bf9b8543c32","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/pulls/38/commits","review_comments_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/pulls/38/comments","review_comment_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/issues/38/comments","statuses_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/statuses/6653d3885a0d8ec35fd7424e67b168cec7e8a1cf","head":{"label":"tinyclues:hashivault_write_changed_support","ref":"hashivault_write_changed_support","sha":"6653d3885a0d8ec35fd7424e67b168cec7e8a1cf","user":{"login":"tinyclues","id":724673,"avatar_url":"https://avatars0.githubusercontent.com/u/724673?v=4","gravatar_id":"","url":"https://api.github.com/users/tinyclues","html_url":"https://github.com/tinyclues","followers_url":"https://api.github.com/users/tinyclues/followers","following_url":"https://api.github.com/users/tinyclues/following{/other_user}","gists_url":"https://api.github.com/users/tinyclues/gists{/gist_id}","starred_url":"https://api.github.com/users/tinyclues/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tinyclues/subscriptions","organizations_url":"https://api.github.com/users/tinyclues/orgs","repos_url":"https://api.github.com/users/tinyclues/repos","events_url":"https://api.github.com/users/tinyclues/events{/privacy}","received_events_url":"https://api.github.com/users/tinyclues/received_events","type":"Organization","site_admin":false},"repo":{"id":110556821,"name":"ansible-modules-hashivault","full_name":"tinyclues/ansible-modules-hashivault","owner":{"login":"tinyclues","id":724673,"avatar_url":"https://avatars0.githubusercontent.com/u/724673?v=4","gravatar_id":"","url":"https://api.github.com/users/tinyclues","html_url":"https://github.com/tinyclues","followers_url":"https://api.github.com/users/tinyclues/followers","following_url":"https://api.github.com/users/tinyclues/following{/other_user}","gists_url":"https://api.github.com/users/tinyclues/gists{/gist_id}","starred_url":"https://api.github.com/users/tinyclues/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tinyclues/subscriptions","organizations_url":"https://api.github.com/users/tinyclues/orgs","repos_url":"https://api.github.com/users/tinyclues/repos","events_url":"https://api.github.com/users/tinyclues/events{/privacy}","received_events_url":"https://api.github.com/users/tinyclues/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tinyclues/ansible-modules-hashivault","description":"Ansible module for Hashicorp Vault.","fork":true,"url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault","forks_url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault/forks","keys_url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault/teams","hooks_url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault/hooks","issue_events_url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault/issues/events{/number}","events_url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault/events","assignees_url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault/assignees{/user}","branches_url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault/branches{/branch}","tags_url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault/tags","blobs_url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault/git/refs{/sha}","trees_url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault/statuses/{sha}","languages_url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault/languages","stargazers_url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault/stargazers","contributors_url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault/contributors","subscribers_url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault/subscribers","subscription_url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault/subscription","commits_url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault/commits{/sha}","git_commits_url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault/git/commits{/sha}","comments_url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault/comments{/number}","issue_comment_url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault/issues/comments{/number}","contents_url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault/contents/{+path}","compare_url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault/merges","archive_url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault/downloads","issues_url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault/issues{/number}","pulls_url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault/pulls{/number}","milestones_url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault/milestones{/number}","notifications_url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault/labels{/name}","releases_url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault/releases{/id}","deployments_url":"https://api.github.com/repos/tinyclues/ansible-modules-hashivault/deployments","created_at":"2017-11-13T14:14:41Z","updated_at":"2017-11-13T14:14:43Z","pushed_at":"2017-11-13T16:35:46Z","git_url":"git://github.com/tinyclues/ansible-modules-hashivault.git","ssh_url":"git@github.com:tinyclues/ansible-modules-hashivault.git","clone_url":"https://github.com/tinyclues/ansible-modules-hashivault.git","svn_url":"https://github.com/tinyclues/ansible-modules-hashivault","homepage":"https://pypi.python.org/pypi/ansible-modules-hashivault","size":152,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"TerryHowe:master","ref":"master","sha":"fe1bbf01a95c3650806688b1cc06202a3f5067fc","user":{"login":"TerryHowe","id":104113,"avatar_url":"https://avatars2.githubusercontent.com/u/104113?v=4","gravatar_id":"","url":"https://api.github.com/users/TerryHowe","html_url":"https://github.com/TerryHowe","followers_url":"https://api.github.com/users/TerryHowe/followers","following_url":"https://api.github.com/users/TerryHowe/following{/other_user}","gists_url":"https://api.github.com/users/TerryHowe/gists{/gist_id}","starred_url":"https://api.github.com/users/TerryHowe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TerryHowe/subscriptions","organizations_url":"https://api.github.com/users/TerryHowe/orgs","repos_url":"https://api.github.com/users/TerryHowe/repos","events_url":"https://api.github.com/users/TerryHowe/events{/privacy}","received_events_url":"https://api.github.com/users/TerryHowe/received_events","type":"User","site_admin":false},"repo":{"id":57915238,"name":"ansible-modules-hashivault","full_name":"TerryHowe/ansible-modules-hashivault","owner":{"login":"TerryHowe","id":104113,"avatar_url":"https://avatars2.githubusercontent.com/u/104113?v=4","gravatar_id":"","url":"https://api.github.com/users/TerryHowe","html_url":"https://github.com/TerryHowe","followers_url":"https://api.github.com/users/TerryHowe/followers","following_url":"https://api.github.com/users/TerryHowe/following{/other_user}","gists_url":"https://api.github.com/users/TerryHowe/gists{/gist_id}","starred_url":"https://api.github.com/users/TerryHowe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TerryHowe/subscriptions","organizations_url":"https://api.github.com/users/TerryHowe/orgs","repos_url":"https://api.github.com/users/TerryHowe/repos","events_url":"https://api.github.com/users/TerryHowe/events{/privacy}","received_events_url":"https://api.github.com/users/TerryHowe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TerryHowe/ansible-modules-hashivault","description":"Ansible module for Hashicorp Vault.","fork":false,"url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault","forks_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/forks","keys_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/teams","hooks_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/hooks","issue_events_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/issues/events{/number}","events_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/events","assignees_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/assignees{/user}","branches_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/branches{/branch}","tags_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/tags","blobs_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/git/refs{/sha}","trees_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/statuses/{sha}","languages_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/languages","stargazers_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/stargazers","contributors_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/contributors","subscribers_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/subscribers","subscription_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/subscription","commits_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/commits{/sha}","git_commits_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/git/commits{/sha}","comments_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/comments{/number}","issue_comment_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/issues/comments{/number}","contents_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/contents/{+path}","compare_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/merges","archive_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/downloads","issues_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/issues{/number}","pulls_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/pulls{/number}","milestones_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/milestones{/number}","notifications_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/labels{/name}","releases_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/releases{/id}","deployments_url":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/deployments","created_at":"2016-05-02T19:22:57Z","updated_at":"2017-11-16T16:20:29Z","pushed_at":"2017-11-13T16:47:06Z","git_url":"git://github.com/TerryHowe/ansible-modules-hashivault.git","ssh_url":"git@github.com:TerryHowe/ansible-modules-hashivault.git","clone_url":"https://github.com/TerryHowe/ansible-modules-hashivault.git","svn_url":"https://github.com/TerryHowe/ansible-modules-hashivault","homepage":"https://pypi.python.org/pypi/ansible-modules-hashivault","size":154,"stargazers_count":70,"watchers_count":70,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"archived":false,"open_issues_count":2,"forks":21,"open_issues":2,"watchers":70,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/pulls/38"},"html":{"href":"https://github.com/TerryHowe/ansible-modules-hashivault/pull/38"},"issue":{"href":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/issues/38"},"comments":{"href":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/issues/38/comments"},"review_comments":{"href":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/pulls/38/comments"},"review_comment":{"href":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/pulls/38/commits"},"statuses":{"href":"https://api.github.com/repos/TerryHowe/ansible-modules-hashivault/statuses/6653d3885a0d8ec35fd7424e67b168cec7e8a1cf"}},"author_association":"NONE"}}
{"actor":{"display_login":"TerryHowe"}}