mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
2.0 KiB
YAML
63 lines
2.0 KiB
YAML
---
|
|
- debug:
|
|
msg: "Executing tests with backend {{ select_crypto_backend }}"
|
|
|
|
- name: ({{select_crypto_backend}}) Get certificate info
|
|
openssl_certificate_info:
|
|
path: '{{ output_dir }}/cert_1.pem'
|
|
select_crypto_backend: '{{ select_crypto_backend }}'
|
|
register: result
|
|
|
|
- name: Check whether issuer and subject behave as expected
|
|
assert:
|
|
that:
|
|
- result.issuer.organizationalUnitName == 'ACME Department'
|
|
- "['organizationalUnitName', 'Crypto Department'] in result.issuer_ordered"
|
|
- "['organizationalUnitName', 'ACME Department'] in result.issuer_ordered"
|
|
- result.subject.organizationalUnitName == 'ACME Department'
|
|
- "['organizationalUnitName', 'Crypto Department'] in result.subject_ordered"
|
|
- "['organizationalUnitName', 'ACME Department'] in result.subject_ordered"
|
|
|
|
- name: Update result list
|
|
set_fact:
|
|
info_results: "{{ info_results + [result] }}"
|
|
|
|
- name: ({{select_crypto_backend}}) Get certificate info
|
|
openssl_certificate_info:
|
|
path: '{{ output_dir }}/cert_2.pem'
|
|
select_crypto_backend: '{{ select_crypto_backend }}'
|
|
valid_at:
|
|
today: "+0d"
|
|
past: "20190101235901Z"
|
|
twentydays: "+20d"
|
|
register: result
|
|
- assert:
|
|
that:
|
|
- result.valid_at.today
|
|
- not result.valid_at.past
|
|
- not result.valid_at.twentydays
|
|
|
|
- name: Update result list
|
|
set_fact:
|
|
info_results: "{{ info_results + [result] }}"
|
|
|
|
- name: ({{select_crypto_backend}}) Get certificate info
|
|
openssl_certificate_info:
|
|
path: '{{ output_dir }}/cert_3.pem'
|
|
select_crypto_backend: '{{ select_crypto_backend }}'
|
|
register: result
|
|
|
|
- name: Update result list
|
|
set_fact:
|
|
info_results: "{{ info_results + [result] }}"
|
|
|
|
- name: ({{select_crypto_backend}}) Get certificate info
|
|
openssl_certificate_info:
|
|
path: '{{ output_dir }}/cert_4.pem'
|
|
select_crypto_backend: '{{ select_crypto_backend }}'
|
|
register: result
|
|
|
|
- name: Update result list
|
|
set_fact:
|
|
info_results: "{{ info_results + [result] }}"
|