2017-09-13 21:39:32 +00:00
|
|
|
- block:
|
|
|
|
- name: Generate privatekey
|
|
|
|
openssl_privatekey:
|
|
|
|
path: '{{ output_dir }}/privatekey.pem'
|
|
|
|
|
|
|
|
- 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.example.com
|
2017-09-13 21:39:32 +00:00
|
|
|
|
|
|
|
- name: Generate selfsigned certificate
|
|
|
|
openssl_certificate:
|
|
|
|
path: '{{ output_dir }}/cert.pem'
|
|
|
|
csr_path: '{{ output_dir }}/csr.csr'
|
|
|
|
privatekey_path: '{{ output_dir }}/privatekey.pem'
|
|
|
|
provider: selfsigned
|
|
|
|
selfsigned_digest: sha256
|
|
|
|
|
|
|
|
- name: Check selfsigned certificate
|
|
|
|
openssl_certificate:
|
|
|
|
path: '{{ output_dir }}/cert.pem'
|
|
|
|
privatekey_path: '{{ output_dir }}/privatekey.pem'
|
|
|
|
provider: assertonly
|
|
|
|
has_expired: False
|
|
|
|
version: 3
|
|
|
|
signature_algorithms:
|
|
|
|
- sha256WithRSAEncryption
|
|
|
|
- sha256WithECDSAEncryption
|
2017-12-12 12:35:22 +00:00
|
|
|
subject:
|
|
|
|
commonName: www.example.com
|
2017-09-13 21:39:32 +00:00
|
|
|
|
2017-09-14 13:21:32 +00:00
|
|
|
- name: Generate selfsigned v2 certificate
|
|
|
|
openssl_certificate:
|
|
|
|
path: '{{ output_dir }}/cert_v2.pem'
|
|
|
|
csr_path: '{{ output_dir }}/csr.csr'
|
|
|
|
privatekey_path: '{{ output_dir }}/privatekey.pem'
|
|
|
|
provider: selfsigned
|
|
|
|
selfsigned_digest: sha256
|
|
|
|
selfsigned_version: 2
|
|
|
|
|
2017-09-13 21:39:32 +00:00
|
|
|
- name: Generate privatekey2
|
|
|
|
openssl_privatekey:
|
|
|
|
path: '{{ output_dir }}/privatekey2.pem'
|
|
|
|
|
|
|
|
- name: Generate CSR2
|
|
|
|
openssl_csr:
|
2017-12-12 12:35:22 +00:00
|
|
|
subject:
|
|
|
|
CN: www.example.com
|
|
|
|
C: US
|
|
|
|
ST: California
|
|
|
|
L: Los Angeles
|
|
|
|
O: ACME Inc.
|
|
|
|
OU:
|
|
|
|
- Roadrunner pest control
|
|
|
|
- Pyrotechnics
|
2017-09-13 21:39:32 +00:00
|
|
|
path: '{{ output_dir }}/csr2.csr'
|
|
|
|
privatekey_path: '{{ output_dir }}/privatekey2.pem'
|
2017-09-14 16:03:00 +00:00
|
|
|
keyUsage:
|
|
|
|
- digitalSignature
|
|
|
|
extendedKeyUsage:
|
|
|
|
- ipsecUser
|
|
|
|
- biometricInfo
|
2017-09-13 21:39:32 +00:00
|
|
|
|
|
|
|
- name: Generate selfsigned certificate2
|
|
|
|
openssl_certificate:
|
|
|
|
path: '{{ output_dir }}/cert2.pem'
|
|
|
|
csr_path: '{{ output_dir }}/csr2.csr'
|
|
|
|
privatekey_path: '{{ output_dir }}/privatekey2.pem'
|
|
|
|
provider: selfsigned
|
|
|
|
selfsigned_digest: sha256
|
|
|
|
|
|
|
|
- name: Check selfsigned certificate2
|
|
|
|
openssl_certificate:
|
|
|
|
path: '{{ output_dir }}/cert2.pem'
|
|
|
|
privatekey_path: '{{ output_dir }}/privatekey2.pem'
|
|
|
|
provider: assertonly
|
|
|
|
has_expired: False
|
|
|
|
version: 3
|
|
|
|
signature_algorithms:
|
|
|
|
- sha256WithRSAEncryption
|
|
|
|
- sha256WithECDSAEncryption
|
|
|
|
subject:
|
2017-12-12 12:35:22 +00:00
|
|
|
commonName: www.example.com
|
2017-09-13 21:39:32 +00:00
|
|
|
C: US
|
|
|
|
ST: California
|
|
|
|
L: Los Angeles
|
|
|
|
O: ACME Inc.
|
2017-12-12 12:35:22 +00:00
|
|
|
OU:
|
|
|
|
- Roadrunner pest control
|
|
|
|
- Pyrotechnics
|
2017-09-14 16:03:00 +00:00
|
|
|
keyUsage:
|
|
|
|
- digitalSignature
|
|
|
|
extendedKeyUsage:
|
|
|
|
- ipsecUser
|
|
|
|
- biometricInfo
|
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', '>=')
|