|
|
|
@ -4,12 +4,39 @@
|
|
|
|
|
openssl_privatekey:
|
|
|
|
|
path: '{{ output_dir }}/privatekey.pem'
|
|
|
|
|
|
|
|
|
|
- name: Generate CSR (check mode)
|
|
|
|
|
openssl_csr:
|
|
|
|
|
path: '{{ output_dir }}/csr.csr'
|
|
|
|
|
privatekey_path: '{{ output_dir }}/privatekey.pem'
|
|
|
|
|
subject:
|
|
|
|
|
commonName: www.ansible.com
|
|
|
|
|
check_mode: yes
|
|
|
|
|
register: generate_csr_check
|
|
|
|
|
|
|
|
|
|
- name: Generate CSR
|
|
|
|
|
openssl_csr:
|
|
|
|
|
path: '{{ output_dir }}/csr.csr'
|
|
|
|
|
privatekey_path: '{{ output_dir }}/privatekey.pem'
|
|
|
|
|
subject:
|
|
|
|
|
commonName: www.ansible.com
|
|
|
|
|
register: generate_csr
|
|
|
|
|
|
|
|
|
|
- name: Generate CSR (idempotent)
|
|
|
|
|
openssl_csr:
|
|
|
|
|
path: '{{ output_dir }}/csr.csr'
|
|
|
|
|
privatekey_path: '{{ output_dir }}/privatekey.pem'
|
|
|
|
|
subject:
|
|
|
|
|
commonName: www.ansible.com
|
|
|
|
|
register: generate_csr_check_idempotent
|
|
|
|
|
|
|
|
|
|
- name: Generate CSR (idempotent, check mode)
|
|
|
|
|
openssl_csr:
|
|
|
|
|
path: '{{ output_dir }}/csr.csr'
|
|
|
|
|
privatekey_path: '{{ output_dir }}/privatekey.pem'
|
|
|
|
|
subject:
|
|
|
|
|
commonName: www.ansible.com
|
|
|
|
|
check_mode: yes
|
|
|
|
|
register: generate_csr_check_idempotent_check
|
|
|
|
|
|
|
|
|
|
# keyUsage longname and shortname should be able to be used
|
|
|
|
|
# interchangeably. Hence the long name is specified here
|
|
|
|
@ -37,8 +64,8 @@
|
|
|
|
|
subject:
|
|
|
|
|
commonName: 'www.ansible.com'
|
|
|
|
|
keyUsage:
|
|
|
|
|
- Key Agreement
|
|
|
|
|
- digitalSignature
|
|
|
|
|
- keyAgreement
|
|
|
|
|
extendedKeyUsage:
|
|
|
|
|
- ipsecUser
|
|
|
|
|
- qcStatements
|
|
|
|
@ -46,6 +73,35 @@
|
|
|
|
|
- Biometric Info
|
|
|
|
|
register: csr_ku_xku
|
|
|
|
|
|
|
|
|
|
- name: Generate CSR with KU and XKU (test XKU change)
|
|
|
|
|
openssl_csr:
|
|
|
|
|
path: '{{ output_dir }}/csr_ku_xku.csr'
|
|
|
|
|
privatekey_path: '{{ output_dir }}/privatekey.pem'
|
|
|
|
|
subject:
|
|
|
|
|
commonName: 'www.ansible.com'
|
|
|
|
|
keyUsage:
|
|
|
|
|
- digitalSignature
|
|
|
|
|
- keyAgreement
|
|
|
|
|
extendedKeyUsage:
|
|
|
|
|
- ipsecUser
|
|
|
|
|
- qcStatements
|
|
|
|
|
- Biometric Info
|
|
|
|
|
register: csr_ku_xku_change
|
|
|
|
|
|
|
|
|
|
- name: Generate CSR with KU and XKU (test KU change)
|
|
|
|
|
openssl_csr:
|
|
|
|
|
path: '{{ output_dir }}/csr_ku_xku.csr'
|
|
|
|
|
privatekey_path: '{{ output_dir }}/privatekey.pem'
|
|
|
|
|
subject:
|
|
|
|
|
commonName: 'www.ansible.com'
|
|
|
|
|
keyUsage:
|
|
|
|
|
- digitalSignature
|
|
|
|
|
extendedKeyUsage:
|
|
|
|
|
- ipsecUser
|
|
|
|
|
- qcStatements
|
|
|
|
|
- Biometric Info
|
|
|
|
|
register: csr_ku_xku_change_2
|
|
|
|
|
|
|
|
|
|
- name: Generate CSR with old API
|
|
|
|
|
openssl_csr:
|
|
|
|
|
path: '{{ output_dir }}/csr_oldapi.csr'
|
|
|
|
|