Skip to content

Commit

Permalink
[DO NOT MERGE] More debugging.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed May 20, 2024
1 parent 410bf46 commit 2e2c071
Showing 1 changed file with 56 additions and 1 deletion.
57 changes: 56 additions & 1 deletion tests/integration/targets/acme_certificate_order/tasks/impl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,57 @@
- validate_1 is changed
- validate_1.account_uri == account.account_uri

- name: Get order information
- name: Get order information (1/3)
acme_certificate_order_info:
acme_directory: https://{{ acme_host }}:14000/dir
acme_version: 2
validate_certs: false
account_key_src: "{{ remote_tmp_dir }}/accountkey.pem"
select_crypto_backend: "{{ select_crypto_backend }}"
order_uri: "{{ order.order_uri }}"
register: order_info_2

- name: Get authz
acme_inspect:
acme_directory: https://{{ acme_host }}:14000/dir
acme_version: 2
validate_certs: false
account_key_src: "{{ remote_tmp_dir }}/accountkey.pem"
account_uri: "{{ order_info_2.account_uri }}"
select_crypto_backend: "{{ select_crypto_backend }}"
method: get
url: >-
{{ order_info_2.authorizations_by_identifier['dns:' ~ domain_name].uri }}
- name: Get http-01 challenge
acme_inspect:
acme_directory: https://{{ acme_host }}:14000/dir
acme_version: 2
validate_certs: false
account_key_src: "{{ remote_tmp_dir }}/accountkey.pem"
account_uri: "{{ order_info_2.account_uri }}"
select_crypto_backend: "{{ select_crypto_backend }}"
method: get
url: >-
{{ order_info_2.authorizations_by_identifier['dns:' ~ domain_name].challenges | selectattr('type', 'equalto', 'http-01') | map(attribute='url') | first }}
- pause:
seconds: 1

- name: Get order information (2/3)
acme_certificate_order_info:
acme_directory: https://{{ acme_host }}:14000/dir
acme_version: 2
validate_certs: false
account_key_src: "{{ remote_tmp_dir }}/accountkey.pem"
select_crypto_backend: "{{ select_crypto_backend }}"
order_uri: "{{ order.order_uri }}"
register: order_info_2

- pause:
seconds: 1

- name: Get order information (3/3)
acme_certificate_order_info:
acme_directory: https://{{ acme_host }}:14000/dir
acme_version: 2
Expand All @@ -160,6 +210,11 @@
debug:
var: order_info_2

- debug:
var: order_info_2.authorizations_by_identifier['dns:' ~ domain_name].challenges | selectattr('type', 'equalto', 'http-01') | map(attribute='status') | first | default('not there')
- debug:
var: order_info_2.authorizations_by_identifier['dns:' ~ domain_name].challenges | selectattr('type', 'equalto', 'dns-01') | map(attribute='status') | first | default('not there')

- name: Check order information
assert:
that:
Expand Down

0 comments on commit 2e2c071

Please sign in to comment.