1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Added client_cert and client_key to the maven_artifact module. (#1127) (#1142)

* Added client_cert and client_key to the maven_artifact module.

* Changelog fragment for PR-1127

* Apply suggestions from code review

Changes suggested in review. Match argument_spec values to documentation values.

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update changelogs/fragments/1127-maven_artifact_client_cert.yml

Documentation formatting suggestion.

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 18a5330e62)

Co-authored-by: mdaves93 <mdavies.23.93@gmail.com>
This commit is contained in:
patchback[bot] 2020-10-20 20:27:23 +02:00 committed by GitHub
parent af4f1f727d
commit c826a81b40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 0 deletions

View file

@ -0,0 +1,2 @@
minor_changes:
- maven_artifact - added ``client_cert`` and ``client_key`` parameters to the maven_artifact module (https://github.com/ansible-collections/community.general/issues/1123).

View file

@ -95,6 +95,18 @@ options:
- If C(no), SSL certificates will not be validated. This should only be set to C(no) when no other option exists. - If C(no), SSL certificates will not be validated. This should only be set to C(no) when no other option exists.
type: bool type: bool
default: 'yes' default: 'yes'
client_cert:
description:
- PEM formatted certificate chain file to be used for SSL client authentication.
- This file can also include the key as well, and if the key is included, I(client_key) is not required.
type: path
version_added: '1.3.0'
client_key:
description:
- PEM formatted file that contains your private key to be used for SSL client authentication.
- If I(client_cert) contains both the certificate and key, this option is not required.
type: path
version_added: '1.3.0'
keep_name: keep_name:
description: description:
- If C(yes), the downloaded artifact's name is preserved, i.e the version number remains part of it. - If C(yes), the downloaded artifact's name is preserved, i.e the version number remains part of it.
@ -143,6 +155,15 @@ EXAMPLES = '''
password: pass password: pass
dest: /tmp/library-name-latest.jar dest: /tmp/library-name-latest.jar
- name: Download an artifact from a private repository requiring certificate authentication
community.general.maven_artifact:
group_id: com.company
artifact_id: library-name
repository_url: 'https://repo.company.com/maven'
client_cert: /path/to/cert.pem
client_key: /path/to/key.pem
dest: /tmp/library-name-latest.jar
- name: Download a WAR File to the Tomcat webapps directory to be deployed - name: Download a WAR File to the Tomcat webapps directory to be deployed
community.general.maven_artifact: community.general.maven_artifact:
group_id: com.company group_id: com.company
@ -552,6 +573,8 @@ def main():
timeout=dict(default=10, type='int'), timeout=dict(default=10, type='int'),
dest=dict(type="path", required=True), dest=dict(type="path", required=True),
validate_certs=dict(required=False, default=True, type='bool'), validate_certs=dict(required=False, default=True, type='bool'),
client_cert=dict(type="path", required=False),
client_key=dict(type="path", required=False),
keep_name=dict(required=False, default=False, type='bool'), keep_name=dict(required=False, default=False, type='bool'),
verify_checksum=dict(required=False, default='download', choices=['never', 'download', 'change', 'always']), verify_checksum=dict(required=False, default='download', choices=['never', 'download', 'change', 'always']),
directory_mode=dict(type='str'), # Used since https://github.com/ansible/ansible/pull/24965, not sure directory_mode=dict(type='str'), # Used since https://github.com/ansible/ansible/pull/24965, not sure