2017-09-13 21:39:32 +00:00
|
|
|
- block:
|
|
|
|
- name: Generate privatekey
|
|
|
|
openssl_privatekey:
|
|
|
|
path: '{{ output_dir }}/privatekey.pem'
|
2017-07-25 11:18:18 +00:00
|
|
|
|
2017-09-13 21:39:32 +00:00
|
|
|
- name: Generate CSR
|
|
|
|
openssl_csr:
|
|
|
|
path: '{{ output_dir }}/csr.csr'
|
|
|
|
privatekey_path: '{{ output_dir }}/privatekey.pem'
|
2017-12-12 12:35:22 +00:00
|
|
|
subject:
|
|
|
|
commonName: www.ansible.com
|
2017-07-25 11:18:18 +00:00
|
|
|
|
2017-09-14 16:03:00 +00:00
|
|
|
# keyUsage longname and shortname should be able to be used
|
|
|
|
# interchangeably. Hence the long name is specified here
|
|
|
|
# but the short name is used to test idempotency for ipsecuser
|
|
|
|
# and vice-versa for biometricInfo
|
|
|
|
- name: Generate CSR with KU and XKU
|
|
|
|
openssl_csr:
|
|
|
|
path: '{{ output_dir }}/csr_ku_xku.csr'
|
|
|
|
privatekey_path: '{{ output_dir }}/privatekey.pem'
|
2017-12-12 12:35:22 +00:00
|
|
|
subject:
|
|
|
|
CN: www.ansible.com
|
2017-09-14 16:03:00 +00:00
|
|
|
keyUsage:
|
|
|
|
- digitalSignature
|
|
|
|
- keyAgreement
|
|
|
|
extendedKeyUsage:
|
|
|
|
- qcStatements
|
|
|
|
- DVCS
|
|
|
|
- IPSec User
|
|
|
|
- biometricInfo
|
|
|
|
|
|
|
|
- name: Generate CSR with KU and XKU (test idempotency)
|
|
|
|
openssl_csr:
|
|
|
|
path: '{{ output_dir }}/csr_ku_xku.csr'
|
|
|
|
privatekey_path: '{{ output_dir }}/privatekey.pem'
|
2017-12-12 12:35:22 +00:00
|
|
|
subject:
|
|
|
|
commonName: 'www.ansible.com'
|
2017-09-14 16:03:00 +00:00
|
|
|
keyUsage:
|
|
|
|
- digitalSignature
|
|
|
|
- keyAgreement
|
|
|
|
extendedKeyUsage:
|
|
|
|
- ipsecUser
|
|
|
|
- qcStatements
|
|
|
|
- DVCS
|
|
|
|
- Biometric Info
|
|
|
|
register: csr_ku_xku
|
|
|
|
|
2017-12-12 12:35:22 +00:00
|
|
|
- name: Generate CSR with old API
|
|
|
|
openssl_csr:
|
|
|
|
path: '{{ output_dir }}/csr_oldapi.csr'
|
|
|
|
privatekey_path: '{{ output_dir }}/privatekey.pem'
|
|
|
|
commonName: www.ansible.com
|
|
|
|
|
2017-09-13 21:39:32 +00:00
|
|
|
- import_tasks: ../tests/validate.yml
|
|
|
|
|
2017-11-27 22:58:08 +00:00
|
|
|
when: pyopenssl_version.stdout is version('0.15', '>=')
|