You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
943B

  1. ---
  2. - name: certificate signing request config
  3. template:
  4. src: csr.cnf.j2
  5. dest: "{{ certificate_signing_request_config_file }}"
  6. - name: certificate signing request
  7. command: openssl req -new
  8. -config "{{ certificate_signing_request_config_file }}"
  9. -key "{{ certificate_private_key_file }}"
  10. -sha256
  11. -out "{{certificate_signing_request_file}}"
  12. {{ certificate_private_key_password is defined | ternary('-passin env:PRIVATE_KEY_PASSWORD','') }}
  13. args:
  14. creates: "{{certificate_signing_request_file}}"
  15. environment:
  16. PRIVATE_KEY_PASSWORD: "{{ certificate_private_key_password | default('') }}"
  17. - name: certificate signing request info
  18. command: openssl req -text -noout
  19. -in "{{certificate_signing_request_file}}"
  20. changed_when: false
  21. register: _certificate_signing_request_info
  22. # - name: certificate signing request debug
  23. # debug:
  24. # msg: "{{ _certificate_signing_request_info.stdout_lines }}"