{"action":"created","comment":{"url":"https://api.github.com/repos/ansible/ansible/pulls/comments/134411116","pull_request_review_id":57692786,"id":134411116,"diff_hunk":"@@ -0,0 +1,766 @@\n+#!/usr/bin/python\n+# -*- coding: utf-8 -*-\n+\n+# (c) 2016-2017, Yanis Guenane <yanis+ansible@guenane.org>\n+# (c) 2017, Markus Teufelberger <mteufelberger+ansible@mgit.at>\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+\n+ANSIBLE_METADATA = {'metadata_version': '1.1',\n+                    'status': ['preview'],\n+                    'supported_by': 'community'}\n+\n+\n+DOCUMENTATION = '''\n+---\n+module: openssl_certificate\n+author:\n+  - Yanis Guenane (@Spredzy)\n+  - Markus Teufelberger (@MarkusTeufelberger)\n+version_added: \"2.4\"\n+short_description: Generate and/or check OpenSSL certificates\n+description:\n+    - \"This module allows one to (re)generate OpenSSL certificates. It implements a notion\n+       of provider (ie. 'selfsigned', 'acme', 'assertonly') for your certificate.\n+       The 'assertonly' provider is intended for use cases where one is only interested in\n+       checking properties of a supplied certificate.\n+       Many properties that can be specified in this module are for validation of an\n+       existing or newly generated certificate. The proper place to specify them, if you\n+       want to receive a certificate with these properties is a CSR (Certificate Signing Request).\n+       It uses the pyOpenSSL python library to interact with OpenSSL.\"\n+requirements:\n+    - \"python-pyOpenSSL >= 0.15\"","path":"lib/ansible/modules/crypto/openssl_certificate.py","position":35,"original_position":35,"commit_id":"f510017abfc60a0a403097b0e2a4b8d4346369a1","original_commit_id":"f510017abfc60a0a403097b0e2a4b8d4346369a1","user":{"login":"pilou-","id":1356830,"avatar_url":"https://avatars1.githubusercontent.com/u/1356830?v=4","gravatar_id":"","url":"https://api.github.com/users/pilou-","html_url":"https://github.com/pilou-","followers_url":"https://api.github.com/users/pilou-/followers","following_url":"https://api.github.com/users/pilou-/following{/other_user}","gists_url":"https://api.github.com/users/pilou-/gists{/gist_id}","starred_url":"https://api.github.com/users/pilou-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pilou-/subscriptions","organizations_url":"https://api.github.com/users/pilou-/orgs","repos_url":"https://api.github.com/users/pilou-/repos","events_url":"https://api.github.com/users/pilou-/events{/privacy}","received_events_url":"https://api.github.com/users/pilou-/received_events","type":"User","site_admin":false},"body":"`PyOpenSSL>= 0.15` seems only required for `SelfSignedCertificate`, with other providers older PyOpenSSL versions should work fine: this information could be added here.","created_at":"2017-08-22T08:10:38Z","updated_at":"2017-08-22T08:11:10Z","html_url":"https://github.com/ansible/ansible/pull/28263#discussion_r134411116","pull_request_url":"https://api.github.com/repos/ansible/ansible/pulls/28263","_links":{"self":{"href":"https://api.github.com/repos/ansible/ansible/pulls/comments/134411116"},"html":{"href":"https://github.com/ansible/ansible/pull/28263#discussion_r134411116"},"pull_request":{"href":"https://api.github.com/repos/ansible/ansible/pulls/28263"}}},"pull_request":{"url":"https://api.github.com/repos/ansible/ansible/pulls/28263","id":135961759,"html_url":"https://github.com/ansible/ansible/pull/28263","diff_url":"https://github.com/ansible/ansible/pull/28263.diff","patch_url":"https://github.com/ansible/ansible/pull/28263.patch","issue_url":"https://api.github.com/repos/ansible/ansible/issues/28263","number":28263,"state":"open","locked":false,"title":"crypto: Add new module openssl_certificate","user":{"login":"Spredzy","id":1191411,"avatar_url":"https://avatars2.githubusercontent.com/u/1191411?v=4","gravatar_id":"","url":"https://api.github.com/users/Spredzy","html_url":"https://github.com/Spredzy","followers_url":"https://api.github.com/users/Spredzy/followers","following_url":"https://api.github.com/users/Spredzy/following{/other_user}","gists_url":"https://api.github.com/users/Spredzy/gists{/gist_id}","starred_url":"https://api.github.com/users/Spredzy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Spredzy/subscriptions","organizations_url":"https://api.github.com/users/Spredzy/orgs","repos_url":"https://api.github.com/users/Spredzy/repos","events_url":"https://api.github.com/users/Spredzy/events{/privacy}","received_events_url":"https://api.github.com/users/Spredzy/received_events","type":"User","site_admin":false},"body":"##### SUMMARY\r\n\r\nThis commit aims to add the openssl_certificate module.\r\n\r\nThis module allows a user to manage openssl certificates.\r\nThis module implement the notion of backend provider, making this module\r\nextensible to anyone wish as long as a provider is coded for it.\r\n\r\nThe current three providers are the following:\r\n\r\n  * selfsigned: Allows a user to self signed a certificate\r\n  * acme: Allow a user to generate acme-based CA challenges certificate.\r\n          (As of this writing this targets letsencrypt)\r\n  * assertonly: Allow a user to assert the characteristic of her SSL\r\n                certificate\r\n\r\n\r\n##### ISSUE TYPE\r\n\r\n - New Module Pull Request\r\n\r\n##### COMPONENT NAME\r\n\r\n- crypto/openssl_certificate\r\n\r\n##### ANSIBLE VERSION\r\n\r\n- devel\r\n\r\n\r\n##### ADDITIONAL INFORMATION\r\n\r\nHere is an example of how this module can be consumed:\r\n\r\n```\r\n---\r\n- hosts: localhost\r\n  tasks:\r\n    - openssl_privatekey:\r\n        path: /tmp/ansible/private.key\r\n\r\n    - openssl_csr:\r\n        path: /tmp/ansible/my.csr\r\n        privatekey_path: /tmp/ansible/private.key\r\n        commonName: www.ansible.com\r\n        keyUsage:\r\n          - digitalSignature\r\n          - keyAgreement\r\n        keyUsage_critical: True\r\n        extendedKeyUsage:\r\n          - clientAuth\r\n        extendedKeyUsage_critical: True\r\n\r\n    - openssl_certificate:\r\n        path: /tmp/ansible/my.crt\r\n        privatekey_path: /tmp/ansible/private.key\r\n        csr_path: /tmp/ansible/my.csr\r\n        provider: selfsigned\r\n        selfsigned_notBefore: 20180101000000Z\r\n        selfsigned_notAfter: 20190101000000Z                                                                                                                                                   \r\n\r\n    - openssl_certificate:\r\n        path: /tmp/ansible/my.crt\r\n        provider: assertonly\r\n        keyUsage:\r\n          - digitalSignature\r\n          - keyAgreement\r\n        keyUsage_strict: True\r\n        extendedKeyUsage:\r\n          - clientAuth\r\n```\r\n\r\nCo-Authored-By:  Markus Teufelberger <mteufelberger+ansible@mgit.at>","created_at":"2017-08-16T07:54:05Z","updated_at":"2017-08-22T08:11:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ef42498362ddcbc6d141b3e2c1c5ede5b7240774","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/ansible/ansible/pulls/28263/commits","review_comments_url":"https://api.github.com/repos/ansible/ansible/pulls/28263/comments","review_comment_url":"https://api.github.com/repos/ansible/ansible/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/28263/comments","statuses_url":"https://api.github.com/repos/ansible/ansible/statuses/f510017abfc60a0a403097b0e2a4b8d4346369a1","head":{"label":"Spredzy:openssl_certificate","ref":"openssl_certificate","sha":"f510017abfc60a0a403097b0e2a4b8d4346369a1","user":{"login":"Spredzy","id":1191411,"avatar_url":"https://avatars2.githubusercontent.com/u/1191411?v=4","gravatar_id":"","url":"https://api.github.com/users/Spredzy","html_url":"https://github.com/Spredzy","followers_url":"https://api.github.com/users/Spredzy/followers","following_url":"https://api.github.com/users/Spredzy/following{/other_user}","gists_url":"https://api.github.com/users/Spredzy/gists{/gist_id}","starred_url":"https://api.github.com/users/Spredzy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Spredzy/subscriptions","organizations_url":"https://api.github.com/users/Spredzy/orgs","repos_url":"https://api.github.com/users/Spredzy/repos","events_url":"https://api.github.com/users/Spredzy/events{/privacy}","received_events_url":"https://api.github.com/users/Spredzy/received_events","type":"User","site_admin":false},"repo":{"id":80817703,"name":"ansible","full_name":"Spredzy/ansible","owner":{"login":"Spredzy","id":1191411,"avatar_url":"https://avatars2.githubusercontent.com/u/1191411?v=4","gravatar_id":"","url":"https://api.github.com/users/Spredzy","html_url":"https://github.com/Spredzy","followers_url":"https://api.github.com/users/Spredzy/followers","following_url":"https://api.github.com/users/Spredzy/following{/other_user}","gists_url":"https://api.github.com/users/Spredzy/gists{/gist_id}","starred_url":"https://api.github.com/users/Spredzy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Spredzy/subscriptions","organizations_url":"https://api.github.com/users/Spredzy/orgs","repos_url":"https://api.github.com/users/Spredzy/repos","events_url":"https://api.github.com/users/Spredzy/events{/privacy}","received_events_url":"https://api.github.com/users/Spredzy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Spredzy/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/Spredzy/ansible","forks_url":"https://api.github.com/repos/Spredzy/ansible/forks","keys_url":"https://api.github.com/repos/Spredzy/ansible/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Spredzy/ansible/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Spredzy/ansible/teams","hooks_url":"https://api.github.com/repos/Spredzy/ansible/hooks","issue_events_url":"https://api.github.com/repos/Spredzy/ansible/issues/events{/number}","events_url":"https://api.github.com/repos/Spredzy/ansible/events","assignees_url":"https://api.github.com/repos/Spredzy/ansible/assignees{/user}","branches_url":"https://api.github.com/repos/Spredzy/ansible/branches{/branch}","tags_url":"https://api.github.com/repos/Spredzy/ansible/tags","blobs_url":"https://api.github.com/repos/Spredzy/ansible/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Spredzy/ansible/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Spredzy/ansible/git/refs{/sha}","trees_url":"https://api.github.com/repos/Spredzy/ansible/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Spredzy/ansible/statuses/{sha}","languages_url":"https://api.github.com/repos/Spredzy/ansible/languages","stargazers_url":"https://api.github.com/repos/Spredzy/ansible/stargazers","contributors_url":"https://api.github.com/repos/Spredzy/ansible/contributors","subscribers_url":"https://api.github.com/repos/Spredzy/ansible/subscribers","subscription_url":"https://api.github.com/repos/Spredzy/ansible/subscription","commits_url":"https://api.github.com/repos/Spredzy/ansible/commits{/sha}","git_commits_url":"https://api.github.com/repos/Spredzy/ansible/git/commits{/sha}","comments_url":"https://api.github.com/repos/Spredzy/ansible/comments{/number}","issue_comment_url":"https://api.github.com/repos/Spredzy/ansible/issues/comments{/number}","contents_url":"https://api.github.com/repos/Spredzy/ansible/contents/{+path}","compare_url":"https://api.github.com/repos/Spredzy/ansible/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Spredzy/ansible/merges","archive_url":"https://api.github.com/repos/Spredzy/ansible/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Spredzy/ansible/downloads","issues_url":"https://api.github.com/repos/Spredzy/ansible/issues{/number}","pulls_url":"https://api.github.com/repos/Spredzy/ansible/pulls{/number}","milestones_url":"https://api.github.com/repos/Spredzy/ansible/milestones{/number}","notifications_url":"https://api.github.com/repos/Spredzy/ansible/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Spredzy/ansible/labels{/name}","releases_url":"https://api.github.com/repos/Spredzy/ansible/releases{/id}","deployments_url":"https://api.github.com/repos/Spredzy/ansible/deployments","created_at":"2017-02-03T10:04:44Z","updated_at":"2017-02-03T10:05:01Z","pushed_at":"2017-08-22T06:32:51Z","git_url":"git://github.com/Spredzy/ansible.git","ssh_url":"git@github.com:Spredzy/ansible.git","clone_url":"https://github.com/Spredzy/ansible.git","svn_url":"https://github.com/Spredzy/ansible","homepage":"http://ansible.com/","size":88564,"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,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"devel"}},"base":{"label":"ansible:devel","ref":"devel","sha":"6d015294c24f15146ae5435527e4e2aae70cbeed","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":"2017-08-22T07:12:54Z","pushed_at":"2017-08-22T08:03:49Z","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":"http://ansible.com/","size":89404,"stargazers_count":24935,"watchers_count":24935,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8648,"mirror_url":null,"open_issues_count":3444,"forks":8648,"open_issues":3444,"watchers":24935,"default_branch":"devel"}},"_links":{"self":{"href":"https://api.github.com/repos/ansible/ansible/pulls/28263"},"html":{"href":"https://github.com/ansible/ansible/pull/28263"},"issue":{"href":"https://api.github.com/repos/ansible/ansible/issues/28263"},"comments":{"href":"https://api.github.com/repos/ansible/ansible/issues/28263/comments"},"review_comments":{"href":"https://api.github.com/repos/ansible/ansible/pulls/28263/comments"},"review_comment":{"href":"https://api.github.com/repos/ansible/ansible/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ansible/ansible/pulls/28263/commits"},"statuses":{"href":"https://api.github.com/repos/ansible/ansible/statuses/f510017abfc60a0a403097b0e2a4b8d4346369a1"}}}}
{"actor":{"display_login":"pilou-"}}