mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-22 12:03:58 -07:00
ACME: using new acme-test-container (#44095)
* Using new acme-test-container image. * Add test for cleaning account contacts.
This commit is contained in:
parent
984cc10465
commit
d8d366ef37
5 changed files with 48 additions and 8 deletions
|
@ -56,6 +56,30 @@
|
|||
- mailto:example@example.com
|
||||
register: account_modified_idempotent
|
||||
|
||||
- name: Clear contact email addresses
|
||||
acme_account:
|
||||
select_crypto_backend: "{{ select_crypto_backend }}"
|
||||
account_key_src: "{{ output_dir }}/accountkey.pem"
|
||||
acme_version: 2
|
||||
acme_directory: https://{{ acme_host }}:14000/dir
|
||||
validate_certs: no
|
||||
state: present
|
||||
# allow_creation: no
|
||||
contact: []
|
||||
register: account_modified_2
|
||||
|
||||
- name: Clear contact email addresses (idempotent)
|
||||
acme_account:
|
||||
select_crypto_backend: "{{ select_crypto_backend }}"
|
||||
account_key_src: "{{ output_dir }}/accountkey.pem"
|
||||
acme_version: 2
|
||||
acme_directory: https://{{ acme_host }}:14000/dir
|
||||
validate_certs: no
|
||||
state: present
|
||||
# allow_creation: no
|
||||
contact: []
|
||||
register: account_modified_2_idempotent
|
||||
|
||||
- name: Generate new account key
|
||||
command: openssl ecparam -name secp384r1 -genkey -out {{ output_dir }}/accountkey2.pem
|
||||
|
||||
|
|
|
@ -22,6 +22,18 @@
|
|||
- account_modified_idempotent is not changed
|
||||
- account_modified_idempotent.account_uri is not none
|
||||
|
||||
- name: Validate that email address was cleared
|
||||
assert:
|
||||
that:
|
||||
- account_modified_2 is changed
|
||||
- account_modified_2.account_uri is not none
|
||||
|
||||
- name: Validate that email address was not cleared a second time (idempotency)
|
||||
assert:
|
||||
that:
|
||||
- account_modified_2_idempotent is not changed
|
||||
- account_modified_2_idempotent.account_uri is not none
|
||||
|
||||
# Note that pebble has no change key endpoint implemented yet!
|
||||
# When it has (and the container was updated), uncomment the
|
||||
# following validations, and delete the ones below the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue