ACME: rename acme_account_facts -> acme_account_info (#54082)

* Rename acme_account_facts -> acme_account_info.

* Add changelog fragment.
This commit is contained in:
Felix Fontein 2019-03-20 14:21:28 +01:00 committed by John R Barker
parent 7a24ecde86
commit 05bca95ab1
9 changed files with 16 additions and 9 deletions

View file

@ -0,0 +1,2 @@
minor_changes:
- The ``acme_account_facts`` module has been renamed to ``acme_account_info``.

View file

@ -0,0 +1 @@
acme_account_info.py

View file

@ -33,7 +33,7 @@ seealso:
- name: Automatic Certificate Management Environment (ACME)
description: The specification of the ACME protocol (RFC 8555).
link: https://tools.ietf.org/html/rfc8555
- module: acme_account_facts
- module: acme_account_info
description: Retrieves facts about an ACME account.
- module: openssl_privatekey
description: Can be used to create a private account key.

View file

@ -15,7 +15,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = '''
---
module: acme_account_facts
module: acme_account_info
author: "Felix Fontein (@felixfontein)"
version_added: "2.7"
short_description: Retrieves information on ACME accounts
@ -26,6 +26,8 @@ description:
- "This module only works with the ACME v2 protocol."
notes:
- "The M(acme_account) module allows to modify, create and delete ACME accounts."
- "This module was called C(acme_account_facts) before Ansible 2.8. The usage
did not change."
seealso:
- module: acme_account
description: Allows to create, modify or delete an ACME account.
@ -35,7 +37,7 @@ extends_documentation_fragment:
EXAMPLES = '''
- name: Check whether an account with the given account key exists
acme_account_facts:
acme_account_info:
account_key_src: /etc/pki/cert/private/account.key
register: account_data
- name: Verify that account exists
@ -48,7 +50,7 @@ EXAMPLES = '''
debug: var=account_data.account.contact
- name: Check whether the account exists and is accessible with the given account key
acme_account_facts:
acme_account_info:
account_key_content: "{{ acme_account_key }}"
account_uri: "{{ acme_account_uri }}"
register: account_data
@ -125,6 +127,8 @@ def main():
),
supports_check_mode=True,
)
if module._name == 'acme_account_facts':
module.deprecate("The 'acme_account_facts' module has been renamed to 'acme_account_info'", version='2.12')
set_crypto_backend(module)
if not module.params.get('validate_certs'):

View file

@ -9,7 +9,7 @@
command: openssl ec -in {{ output_dir }}/accountkey.pem -noout -text
- name: Check that account does not exist
acme_account_facts:
acme_account_info:
select_crypto_backend: "{{ select_crypto_backend }}"
account_key_src: "{{ output_dir }}/accountkey.pem"
acme_version: 2
@ -31,7 +31,7 @@
- mailto:example@example.org
- name: Check that account exists
acme_account_facts:
acme_account_info:
select_crypto_backend: "{{ select_crypto_backend }}"
account_key_src: "{{ output_dir }}/accountkey.pem"
acme_version: 2
@ -51,7 +51,7 @@
contact: []
- name: Check that account was modified
acme_account_facts:
acme_account_info:
select_crypto_backend: "{{ select_crypto_backend }}"
account_key_src: "{{ output_dir }}/accountkey.pem"
acme_version: 2
@ -61,7 +61,7 @@
register: account_modified
- name: Check with wrong account URI
acme_account_facts:
acme_account_info:
select_crypto_backend: "{{ select_crypto_backend }}"
account_key_src: "{{ output_dir }}/accountkey.pem"
acme_version: 2
@ -71,7 +71,7 @@
register: account_not_exist
- name: Check with wrong account key
acme_account_facts:
acme_account_info:
select_crypto_backend: "{{ select_crypto_backend }}"
account_key_src: "{{ output_dir }}/accountkey2.pem"
acme_version: 2