Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

provider-selfsigned.yml 1.0KB

před 7 roky
12345678910111213141516171819202122232425262728293031
  1. ---
  2. - include_tasks: key.yml
  3. - include_tasks: csr.yml
  4. - name: check if the certificate will expire soon
  5. command: openssl x509 -checkend {{ 60*60*24*30 }} -noout -in {{certificate_file}}
  6. register: _certificate_checkend
  7. changed_when: _certificate_checkend.rc == 1
  8. failed_when: _certificate_checkend.rc > 1
  9. - name: self sign certificate
  10. command: openssl x509 -req
  11. -in "{{ certificate_signing_request_file }}"
  12. -signkey "{{ certificate_private_key_file }}"
  13. -extfile "{{ certificate_signing_request_config_file }}"
  14. -extensions certificate_extensions
  15. -out "{{ certificate_file }}"
  16. {{ certificate_private_key_password is defined | ternary('-passin env:PRIVATE_KEY_PASSWORD','') }}
  17. args:
  18. creates: "{{ certificate_file }}"
  19. environment:
  20. PRIVATE_KEY_PASSWORD: "{{ certificate_private_key_password | default('') }}"
  21. notify: certificate changed
  22. when: _certificate_checkend.rc == 1
  23. - name: link full certificate chain file
  24. file:
  25. src: "{{ certificate_file }}"
  26. dest: "{{ certificate_fullchain_file }}"
  27. state: link