Skip to content

Instantly share code, notes, and snippets.

@gdelpierre
Created August 2, 2017 09:36
Show Gist options
  • Save gdelpierre/e9a5edb15e0f1f11b62654d075754ee1 to your computer and use it in GitHub Desktop.
Save gdelpierre/e9a5edb15e0f1f11b62654d075754ee1 to your computer and use it in GitHub Desktop.
---
- name: 'Generate temporary PKCS12 keystore'
openssl_pkcs12:
action: export
path: '/tmp/ansible.p12'
friendly_name: 'raclette'
privatekey_path: '/tmp/key.pem'
cert_path: '/tmp/cert.pem'
ca_certificates: '/tmp/ca.cer'
state: present
- name: 'Generate temporary PKCS12 keystore - 2'
openssl_pkcs12:
action: export
path: '/tmp/ansible.p12'
friendly_name: 'raclette'
privatekey_path: '/tmp/key.pem'
cert_path: '/tmp/cert.pem'
ca_certificates: '/tmp/ca.cer'
state: present
mode: 0400
- name: 'Generate temporary PKCS12 keystore - 3'
openssl_pkcs12:
action: export
path: '/tmp/ansible.p12'
friendly_name: 'raclette'
privatekey_path: '/tmp/key.pem'
cert_path: '/tmp/cert.pem'
ca_certificates: '/tmp/ca.cer'
state: present
mode: 0600
- name: 'Generate temporary PKCS12 keystore - 4'
openssl_pkcs12:
action: export
path: '/tmp/ansible.p12'
friendly_name: 'raclette'
privatekey_path: '/tmp/key.pem'
cert_path: '/tmp/cert.pem'
ca_certificates: '/tmp/ca.cer'
state: present
mode: 0400
- name: 'Generate temporary PKCS12 keystore - 5'
openssl_pkcs12:
action: export
path: '/tmp/ansible.p12'
friendly_name: 'raclette'
privatekey_path: '/tmp/key.pem'
cert_path: '/tmp/cert.pem'
ca_certificates: '/tmp/ca.cer'
state: present
mode: 0777
force: True
- name: 'dump p12'
openssl_pkcs12:
action: parse
src: '/tmp/ansible.p12'
path: '/tmp/ansible-p12.pem'
state: present
- name: 'dump p12 - 2'
openssl_pkcs12:
action: parse
src: '/tmp/ansible.p12'
path: '/tmp/ansible-p12.pem'
state: present
mode: 0600
- name: 'dump p12 - 3'
openssl_pkcs12:
action: parse
src: '/tmp/ansible.p12'
path: '/tmp/ansible-p12.pem'
state: present
mode: 0644
force: True
- name: 'Remove pkcs'
openssl_pkcs12:
path: '/tmp/ansible.p12'
state: absent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment