Skip to content

Commit

Permalink
Revert changes to use community.crypto collection in setup_selfsigned…
Browse files Browse the repository at this point in the history
…_cert
  • Loading branch information
ramperher committed Sep 14, 2023
1 parent f3141df commit 0d74d20
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions roles/setup_selfsigned_cert/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,11 @@
become: true

- name: Generate an OpenSSL private key
community.crypto.openssl_privatekey:
openssl_privatekey:
path: "{{ privatekey_path }}"


- name: Generate an OpenSSL CSR
community.crypto.openssl_csr:
openssl_csr:
path: "{{ csr_path }}"
privatekey_path: "{{ privatekey_path }}"
common_name: "{{ cert_common_name }}"
Expand All @@ -45,24 +44,24 @@
locality_name: "{{ cert_locality }}"
organization_name: "{{ cert_organization }}"
organizational_unit_name: "{{ cert_organizational_unit }}"
basic_constraints_critical: true
create_subject_key_identifier: true
basic_constraints_critical: yes
create_subject_key_identifier: yes
basic_constraints: ["CA:TRUE"]

- name: Generate a selfsigned OpenSSL CA Certificate
community.crypto.x509_certificate:
openssl_certificate:
path: "{{ ownca_path }}"
privatekey_path: "{{ privatekey_path }}"
csr_path: "{{ csr_path }}"
provider: selfsigned

- name: Generate an ownca OpenSSL Certificate
community.crypto.x509_certificate:
openssl_certificate:
path: "{{ cert_path }}"
ownca_privatekey_path: "{{ privatekey_path }}"
csr_path: "{{ csr_path }}"
ownca_path: "{{ ownca_path }}"
ownca_create_authority_key_identifier: true
ownca_create_authority_key_identifier: yes
provider: ownca

- name: Set cert in CA trust
Expand Down

0 comments on commit 0d74d20

Please sign in to comment.