{"action":"created","comment":{"url":"https://api.github.com/repos/ansible/ansible/pulls/comments/174480902","pull_request_review_id":103844660,"id":174480902,"diff_hunk":"@@ -0,0 +1,113 @@\n+#!/usr/bin/python\n+#\n+# Copyright (c) 2016 Amanvir Mundra, <@amanvirmundra>\n+#\n+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n+\n+from __future__ import absolute_import, division, print_function\n+__metaclass__ = type\n+\n+ANSIBLE_METADATA = {\n+    'metadata_version': '1.1',\n+    'status': ['preview'],\n+    'supported_by': 'community'\n+}\n+\n+DOCUMENTATION = '''\n+---\n+module: azure_rm_storageaccount_keys\n+\n+version_added: \"2.6\"\n+\n+short_description: Retrieve Azure Storage Account Keys.\n+\n+description:\n+    - Retrive keys for a Storage Account.\n+\n+options:\n+    resource_group:\n+        description:\n+            - This is the name of the resource group for which you want to retrieve Keys\n+        required: true\n+        default: null\n+    name:\n+        description:\n+            - Name of the Storage Account instance.\n+        required: true\n+        default: null\n+        aliases:\n+            - resource_group_name\n+\n+extends_documentation_fragment:\n+    - azure\n+\n+author:\n+    - Amanvir Mundra (@amanvirmundra)\n+\n+'''\n+\n+EXAMPLES = '''\n+- name: Get Storage account keys\n+  azure_rm_storageaccount_keys:\n+    resource_group: resource_group\n+    name: name\n+'''\n+\n+RETURN = '''\n+key1:\n+    description: Key1 for azure storage account\n+    returned: always\n+    type: str\n+key2:\n+    description: Key2 for azure storage account\n+    returned: always\n+    type: str\n+'''\n+\n+from ansible.module_utils.azure_rm_common import AzureRMModuleBase\n+try:\n+    from msrestazure.azure_exceptions import CloudError\n+except ImportError:\n+    # This is handled in azure_rm_common\n+    pass\n+\n+\n+class AzureRMStorageAccountKeys(AzureRMModuleBase):\n+    def __init__(self):\n+\n+        self.module_arg_spec = dict(\n+            resource_group=dict(type='str', aliases=['resource_group_name'], required=True),\n+            name=dict(type='str', required=True)\n+        )\n+        self.results = dict(\n+            changed=False,\n+            key1=None,","path":"lib/ansible/modules/cloud/azure/azure_rm_storageaccount_keys.py","position":84,"original_position":84,"commit_id":"8285acd9492de98383775ddca0512981f11e40aa","original_commit_id":"8285acd9492de98383775ddca0512981f11e40aa","user":{"login":"amanvirmundra","id":13510798,"avatar_url":"https://avatars2.githubusercontent.com/u/13510798?v=4","gravatar_id":"","url":"https://api.github.com/users/amanvirmundra","html_url":"https://github.com/amanvirmundra","followers_url":"https://api.github.com/users/amanvirmundra/followers","following_url":"https://api.github.com/users/amanvirmundra/following{/other_user}","gists_url":"https://api.github.com/users/amanvirmundra/gists{/gist_id}","starred_url":"https://api.github.com/users/amanvirmundra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amanvirmundra/subscriptions","organizations_url":"https://api.github.com/users/amanvirmundra/orgs","repos_url":"https://api.github.com/users/amanvirmundra/repos","events_url":"https://api.github.com/users/amanvirmundra/events{/privacy}","received_events_url":"https://api.github.com/users/amanvirmundra/received_events","type":"User","site_admin":false},"body":"Got it. This should go away once I do the looping change. Thanks.","created_at":"2018-03-14T14:36:54Z","updated_at":"2018-03-14T14:36:54Z","html_url":"https://github.com/ansible/ansible/pull/37333#discussion_r174480902","pull_request_url":"https://api.github.com/repos/ansible/ansible/pulls/37333","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/ansible/ansible/pulls/comments/174480902"},"html":{"href":"https://github.com/ansible/ansible/pull/37333#discussion_r174480902"},"pull_request":{"href":"https://api.github.com/repos/ansible/ansible/pulls/37333"}},"in_reply_to_id":174480093},"pull_request":{"url":"https://api.github.com/repos/ansible/ansible/pulls/37333","id":174552948,"html_url":"https://github.com/ansible/ansible/pull/37333","diff_url":"https://github.com/ansible/ansible/pull/37333.diff","patch_url":"https://github.com/ansible/ansible/pull/37333.patch","issue_url":"https://api.github.com/repos/ansible/ansible/issues/37333","number":37333,"state":"open","locked":false,"title":"Added module Azure_rm_storageaccount_keys","user":{"login":"amanvirmundra","id":13510798,"avatar_url":"https://avatars2.githubusercontent.com/u/13510798?v=4","gravatar_id":"","url":"https://api.github.com/users/amanvirmundra","html_url":"https://github.com/amanvirmundra","followers_url":"https://api.github.com/users/amanvirmundra/followers","following_url":"https://api.github.com/users/amanvirmundra/following{/other_user}","gists_url":"https://api.github.com/users/amanvirmundra/gists{/gist_id}","starred_url":"https://api.github.com/users/amanvirmundra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amanvirmundra/subscriptions","organizations_url":"https://api.github.com/users/amanvirmundra/orgs","repos_url":"https://api.github.com/users/amanvirmundra/repos","events_url":"https://api.github.com/users/amanvirmundra/events{/privacy}","received_events_url":"https://api.github.com/users/amanvirmundra/received_events","type":"User","site_admin":false},"body":"##### SUMMARY\r\n<!--- Describe the change, including rationale and design decisions -->\r\nAdded a new module called azure_rm_storageaccount_keys (modules/cloud/azure). This modules is used to retrieve storage account keys. \r\nIn a lot of automation scenarios there is need to create a new storage account and pass on the 'key' to subsequent tasks. Currently, there is no azure module that retrieves the keys. The way around is to run a powershell command or make a call to the ARM REST api.\r\nThe module is designed keeping in mind the Azure modules structure and used azure_rm_common for utilizing framework resources.\r\n<!---\r\nIf you are fixing an existing issue, please include \"Fixes #nnn\" in your\r\ncommit message and your description; but you should still explain what\r\nthe change does.\r\n-->\r\n\r\n##### ISSUE TYPE\r\n<!--- Pick one below and delete the rest: -->\r\n - New Module Pull Request\r\n\r\n##### COMPONENT NAME\r\n<!--- Name of the module, plugin, module or task -->\r\nmodules/cloud/azure/azure_rm_storageaccount_keys\r\n##### ANSIBLE VERSION\r\n<!--- Paste verbatim output from \"ansible --version\" between quotes below -->\r\n```\r\nansible 2.4.3.0\r\n  config file = /etc/ansible/ansible.cfg\r\n  configured module search path = [u'/home/amundra/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /usr/lib/python2.7/dist-packages/ansible\r\n  executable location = /usr/bin/ansible\r\n  python version = 2.7.12 (default, Dec  4 2017, 14:50:18) [GCC 5.4.0 20160609]\r\n```\r\n\r\n\r\n##### ADDITIONAL INFORMATION\r\n<!---\r\nInclude additional information to help people understand the change here.\r\nFor bugs that don't have a linked bug report, a step-by-step reproduction\r\nof the problem is helpful.\r\n  -->\r\n\r\n<!--- Paste verbatim command output below, e.g. before and after your change -->\r\n```\r\n\r\n```\r\n","created_at":"2018-03-13T04:03:45Z","updated_at":"2018-03-14T14:36:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ce65f246baa6c8c89aafdff7457d707a3f0bece5","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":379680468,"url":"https://api.github.com/repos/ansible/ansible/labels/azure","name":"azure","color":"c5def5","default":false},{"id":530145226,"url":"https://api.github.com/repos/ansible/ansible/labels/ci_verified","name":"ci_verified","color":"b60205","default":false},{"id":61528803,"url":"https://api.github.com/repos/ansible/ansible/labels/cloud","name":"cloud","color":"c7def8","default":false},{"id":496359346,"url":"https://api.github.com/repos/ansible/ansible/labels/module","name":"module","color":"1d76db","default":false},{"id":61436281,"url":"https://api.github.com/repos/ansible/ansible/labels/needs_revision","name":"needs_revision","color":"eb6450","default":false},{"id":723150340,"url":"https://api.github.com/repos/ansible/ansible/labels/new_contributor","name":"new_contributor","color":"ededed","default":false},{"id":473225334,"url":"https://api.github.com/repos/ansible/ansible/labels/new_module","name":"new_module","color":"ededed","default":false},{"id":153577825,"url":"https://api.github.com/repos/ansible/ansible/labels/new_plugin","name":"new_plugin","color":"bfe5bf","default":false},{"id":636327968,"url":"https://api.github.com/repos/ansible/ansible/labels/support:community","name":"support:community","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ansible/ansible/pulls/37333/commits","review_comments_url":"https://api.github.com/repos/ansible/ansible/pulls/37333/comments","review_comment_url":"https://api.github.com/repos/ansible/ansible/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/37333/comments","statuses_url":"https://api.github.com/repos/ansible/ansible/statuses/8285acd9492de98383775ddca0512981f11e40aa","head":{"label":"amanvirmundra:devel","ref":"devel","sha":"8285acd9492de98383775ddca0512981f11e40aa","user":{"login":"amanvirmundra","id":13510798,"avatar_url":"https://avatars2.githubusercontent.com/u/13510798?v=4","gravatar_id":"","url":"https://api.github.com/users/amanvirmundra","html_url":"https://github.com/amanvirmundra","followers_url":"https://api.github.com/users/amanvirmundra/followers","following_url":"https://api.github.com/users/amanvirmundra/following{/other_user}","gists_url":"https://api.github.com/users/amanvirmundra/gists{/gist_id}","starred_url":"https://api.github.com/users/amanvirmundra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amanvirmundra/subscriptions","organizations_url":"https://api.github.com/users/amanvirmundra/orgs","repos_url":"https://api.github.com/users/amanvirmundra/repos","events_url":"https://api.github.com/users/amanvirmundra/events{/privacy}","received_events_url":"https://api.github.com/users/amanvirmundra/received_events","type":"User","site_admin":false},"repo":{"id":124986333,"name":"ansible","full_name":"amanvirmundra/ansible","owner":{"login":"amanvirmundra","id":13510798,"avatar_url":"https://avatars2.githubusercontent.com/u/13510798?v=4","gravatar_id":"","url":"https://api.github.com/users/amanvirmundra","html_url":"https://github.com/amanvirmundra","followers_url":"https://api.github.com/users/amanvirmundra/followers","following_url":"https://api.github.com/users/amanvirmundra/following{/other_user}","gists_url":"https://api.github.com/users/amanvirmundra/gists{/gist_id}","starred_url":"https://api.github.com/users/amanvirmundra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amanvirmundra/subscriptions","organizations_url":"https://api.github.com/users/amanvirmundra/orgs","repos_url":"https://api.github.com/users/amanvirmundra/repos","events_url":"https://api.github.com/users/amanvirmundra/events{/privacy}","received_events_url":"https://api.github.com/users/amanvirmundra/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/amanvirmundra/ansible","description":"Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy. Avoid writing scripts or custom code to deploy and update your applications— automate in a language that approaches plain English, using SSH, with no agents to install on remote systems.","fork":true,"url":"https://api.github.com/repos/amanvirmundra/ansible","forks_url":"https://api.github.com/repos/amanvirmundra/ansible/forks","keys_url":"https://api.github.com/repos/amanvirmundra/ansible/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amanvirmundra/ansible/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amanvirmundra/ansible/teams","hooks_url":"https://api.github.com/repos/amanvirmundra/ansible/hooks","issue_events_url":"https://api.github.com/repos/amanvirmundra/ansible/issues/events{/number}","events_url":"https://api.github.com/repos/amanvirmundra/ansible/events","assignees_url":"https://api.github.com/repos/amanvirmundra/ansible/assignees{/user}","branches_url":"https://api.github.com/repos/amanvirmundra/ansible/branches{/branch}","tags_url":"https://api.github.com/repos/amanvirmundra/ansible/tags","blobs_url":"https://api.github.com/repos/amanvirmundra/ansible/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amanvirmundra/ansible/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amanvirmundra/ansible/git/refs{/sha}","trees_url":"https://api.github.com/repos/amanvirmundra/ansible/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amanvirmundra/ansible/statuses/{sha}","languages_url":"https://api.github.com/repos/amanvirmundra/ansible/languages","stargazers_url":"https://api.github.com/repos/amanvirmundra/ansible/stargazers","contributors_url":"https://api.github.com/repos/amanvirmundra/ansible/contributors","subscribers_url":"https://api.github.com/repos/amanvirmundra/ansible/subscribers","subscription_url":"https://api.github.com/repos/amanvirmundra/ansible/subscription","commits_url":"https://api.github.com/repos/amanvirmundra/ansible/commits{/sha}","git_commits_url":"https://api.github.com/repos/amanvirmundra/ansible/git/commits{/sha}","comments_url":"https://api.github.com/repos/amanvirmundra/ansible/comments{/number}","issue_comment_url":"https://api.github.com/repos/amanvirmundra/ansible/issues/comments{/number}","contents_url":"https://api.github.com/repos/amanvirmundra/ansible/contents/{+path}","compare_url":"https://api.github.com/repos/amanvirmundra/ansible/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amanvirmundra/ansible/merges","archive_url":"https://api.github.com/repos/amanvirmundra/ansible/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amanvirmundra/ansible/downloads","issues_url":"https://api.github.com/repos/amanvirmundra/ansible/issues{/number}","pulls_url":"https://api.github.com/repos/amanvirmundra/ansible/pulls{/number}","milestones_url":"https://api.github.com/repos/amanvirmundra/ansible/milestones{/number}","notifications_url":"https://api.github.com/repos/amanvirmundra/ansible/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amanvirmundra/ansible/labels{/name}","releases_url":"https://api.github.com/repos/amanvirmundra/ansible/releases{/id}","deployments_url":"https://api.github.com/repos/amanvirmundra/ansible/deployments","created_at":"2018-03-13T03:23:02Z","updated_at":"2018-03-13T18:21:41Z","pushed_at":"2018-03-13T18:21:29Z","git_url":"git://github.com/amanvirmundra/ansible.git","ssh_url":"git@github.com:amanvirmundra/ansible.git","clone_url":"https://github.com/amanvirmundra/ansible.git","svn_url":"https://github.com/amanvirmundra/ansible","homepage":"https://www.ansible.com/","size":113114,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"devel"}},"base":{"label":"ansible:devel","ref":"devel","sha":"9031533c0c37d3b70ae37e7d0ef06c90f8f3a32f","user":{"login":"ansible","id":1507452,"avatar_url":"https://avatars2.githubusercontent.com/u/1507452?v=4","gravatar_id":"","url":"https://api.github.com/users/ansible","html_url":"https://github.com/ansible","followers_url":"https://api.github.com/users/ansible/followers","following_url":"https://api.github.com/users/ansible/following{/other_user}","gists_url":"https://api.github.com/users/ansible/gists{/gist_id}","starred_url":"https://api.github.com/users/ansible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansible/subscriptions","organizations_url":"https://api.github.com/users/ansible/orgs","repos_url":"https://api.github.com/users/ansible/repos","events_url":"https://api.github.com/users/ansible/events{/privacy}","received_events_url":"https://api.github.com/users/ansible/received_events","type":"Organization","site_admin":false},"repo":{"id":3638964,"name":"ansible","full_name":"ansible/ansible","owner":{"login":"ansible","id":1507452,"avatar_url":"https://avatars2.githubusercontent.com/u/1507452?v=4","gravatar_id":"","url":"https://api.github.com/users/ansible","html_url":"https://github.com/ansible","followers_url":"https://api.github.com/users/ansible/followers","following_url":"https://api.github.com/users/ansible/following{/other_user}","gists_url":"https://api.github.com/users/ansible/gists{/gist_id}","starred_url":"https://api.github.com/users/ansible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansible/subscriptions","organizations_url":"https://api.github.com/users/ansible/orgs","repos_url":"https://api.github.com/users/ansible/repos","events_url":"https://api.github.com/users/ansible/events{/privacy}","received_events_url":"https://api.github.com/users/ansible/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ansible/ansible","description":"Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy. Avoid writing scripts or custom code to deploy and update your applications— automate in a language that approaches plain English, using SSH, with no agents to install on remote systems.","fork":false,"url":"https://api.github.com/repos/ansible/ansible","forks_url":"https://api.github.com/repos/ansible/ansible/forks","keys_url":"https://api.github.com/repos/ansible/ansible/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ansible/ansible/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ansible/ansible/teams","hooks_url":"https://api.github.com/repos/ansible/ansible/hooks","issue_events_url":"https://api.github.com/repos/ansible/ansible/issues/events{/number}","events_url":"https://api.github.com/repos/ansible/ansible/events","assignees_url":"https://api.github.com/repos/ansible/ansible/assignees{/user}","branches_url":"https://api.github.com/repos/ansible/ansible/branches{/branch}","tags_url":"https://api.github.com/repos/ansible/ansible/tags","blobs_url":"https://api.github.com/repos/ansible/ansible/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ansible/ansible/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ansible/ansible/git/refs{/sha}","trees_url":"https://api.github.com/repos/ansible/ansible/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ansible/ansible/statuses/{sha}","languages_url":"https://api.github.com/repos/ansible/ansible/languages","stargazers_url":"https://api.github.com/repos/ansible/ansible/stargazers","contributors_url":"https://api.github.com/repos/ansible/ansible/contributors","subscribers_url":"https://api.github.com/repos/ansible/ansible/subscribers","subscription_url":"https://api.github.com/repos/ansible/ansible/subscription","commits_url":"https://api.github.com/repos/ansible/ansible/commits{/sha}","git_commits_url":"https://api.github.com/repos/ansible/ansible/git/commits{/sha}","comments_url":"https://api.github.com/repos/ansible/ansible/comments{/number}","issue_comment_url":"https://api.github.com/repos/ansible/ansible/issues/comments{/number}","contents_url":"https://api.github.com/repos/ansible/ansible/contents/{+path}","compare_url":"https://api.github.com/repos/ansible/ansible/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ansible/ansible/merges","archive_url":"https://api.github.com/repos/ansible/ansible/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ansible/ansible/downloads","issues_url":"https://api.github.com/repos/ansible/ansible/issues{/number}","pulls_url":"https://api.github.com/repos/ansible/ansible/pulls{/number}","milestones_url":"https://api.github.com/repos/ansible/ansible/milestones{/number}","notifications_url":"https://api.github.com/repos/ansible/ansible/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ansible/ansible/labels{/name}","releases_url":"https://api.github.com/repos/ansible/ansible/releases{/id}","deployments_url":"https://api.github.com/repos/ansible/ansible/deployments","created_at":"2012-03-06T14:58:02Z","updated_at":"2018-03-14T13:39:58Z","pushed_at":"2018-03-14T13:24:26Z","git_url":"git://github.com/ansible/ansible.git","ssh_url":"git@github.com:ansible/ansible.git","clone_url":"https://github.com/ansible/ansible.git","svn_url":"https://github.com/ansible/ansible","homepage":"https://www.ansible.com/","size":121106,"stargazers_count":28970,"watchers_count":28970,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":10482,"mirror_url":null,"archived":false,"open_issues_count":4958,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":10482,"open_issues":4958,"watchers":28970,"default_branch":"devel"}},"_links":{"self":{"href":"https://api.github.com/repos/ansible/ansible/pulls/37333"},"html":{"href":"https://github.com/ansible/ansible/pull/37333"},"issue":{"href":"https://api.github.com/repos/ansible/ansible/issues/37333"},"comments":{"href":"https://api.github.com/repos/ansible/ansible/issues/37333/comments"},"review_comments":{"href":"https://api.github.com/repos/ansible/ansible/pulls/37333/comments"},"review_comment":{"href":"https://api.github.com/repos/ansible/ansible/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ansible/ansible/pulls/37333/commits"},"statuses":{"href":"https://api.github.com/repos/ansible/ansible/statuses/8285acd9492de98383775ddca0512981f11e40aa"}},"author_association":"NONE"}}
{"actor":{"display_login":"amanvirmundra"}}