fixed some bugs
This commit is contained in:
parent
ff1cfedadf
commit
313452f5e2
4 changed files with 12 additions and 5 deletions
|
|
@ -8,7 +8,7 @@
|
|||
chainpath: "{{ basepath + '/' + certname + '.chain.crt' }}"
|
||||
fullpath: "{{ basepath + '/private/' + certname + '.complete.pem' }}"
|
||||
- set_fact:
|
||||
cert: "{{ certificates.defaults|combine(cert_paths, certificates.certs[certname]|d({}), {'name': certname} ) }}"
|
||||
cert: "{{ {}|combine(certificates.defaults, cert_paths, certificates.certs[certname]|d({}), {'name': certname} ) }}"
|
||||
|
||||
- debug:
|
||||
verbosity: 1
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
openssl_csr:
|
||||
path: "{{ cert.csrpath }}"
|
||||
privatekey_path: "{{ cert.keypath }}"
|
||||
common_name: "{% if cert.cn %}{{ cert.cn }}{% else %}{{ cert.san[0] }}{% endif %}"
|
||||
common_name: "{% if cert.cn %}{{ cert.cn }}{% elif cert.san|length > 0 %}{{ cert.san[0] }}{% else %}{{ cert.name }}{% endif %}"
|
||||
subject_alt_name: "{{ cert.san | map('regex_replace', '^', 'DNS:') | list }}"
|
||||
register: task_generate_csr
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue