-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
27cf1d7
commit 2346612
Showing
2 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
tests/integration/targets/acme_letsencrypt/dns-challenge-include-role.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
- name: Test if include_role is working | ||
hosts: localhost | ||
tasks: | ||
- name: Create and upload Lets Encrypt certificates | ||
ansible.builtin.include_role: | ||
name: telekom_mms.acme.acme | ||
public: yes | ||
vars: | ||
acme_domain: | ||
certificate_name: dns-pebble.example.com | ||
zone: example.com | ||
email_address: [email protected] | ||
subject_alt_name: | ||
- example.com | ||
acme_challenge_provider: pebble | ||
acme_use_live_directory: false | ||
acme_account_email: [email protected] | ||
acme_staging_directory: https://localhost:14000/dir | ||
acme_validate_certs: false | ||
post_tasks: | ||
- name: Validate certs | ||
community.crypto.x509_certificate_info: | ||
path: "{{ acme_cert_path }}" | ||
register: result | ||
|
||
- name: Print the certificate | ||
ansible.builtin.debug: | ||
msg: "{{ result }}" | ||
|
||
- name: Check if the certificate is correct | ||
ansible.builtin.assert: | ||
that: | ||
- "'DNS:example.com' in result.subject_alt_name" | ||
- "'Pebble Intermediate CA' in result.issuer.commonName" |
11 changes: 11 additions & 0 deletions
11
tests/integration/targets/acme_letsencrypt/dns-challenge-missing-acme-domain.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
- name: Test role if acme_domain is not set | ||
hosts: localhost | ||
roles: | ||
- telekom_mms.acme.acme | ||
vars: | ||
acme_challenge_provider: pebble | ||
acme_use_live_directory: false | ||
acme_account_email: [email protected] | ||
acme_staging_directory: https://localhost:14000/dir | ||
acme_validate_certs: false |