forked from ISTI-ansible-roles/ansible-roles
letsencrypt directory check fixed
This commit is contained in:
parent
f3aae0b9f5
commit
53f3e7c28e
|
@ -21,6 +21,8 @@
|
||||||
- '{{ letsencrypt_acme_user_home | default(omit) }}/certs/fakeselfsignedcert'
|
- '{{ letsencrypt_acme_user_home | default(omit) }}/certs/fakeselfsignedcert'
|
||||||
- '{{ letsencrypt_acme_user_home | default(omit) }}/keys/fakeselfsignedcert'
|
- '{{ letsencrypt_acme_user_home | default(omit) }}/keys/fakeselfsignedcert'
|
||||||
when:
|
when:
|
||||||
|
- true_cert is defined
|
||||||
|
- true_cert.stat is defined
|
||||||
- ( true_cert.stat.islnk is not defined ) and ( letsencrypt_acme_install is defined and letsencrypt_acme_install )
|
- ( true_cert.stat.islnk is not defined ) and ( letsencrypt_acme_install is defined and letsencrypt_acme_install )
|
||||||
- letsencrypt_acme_user_home | default(omit) is defined
|
- letsencrypt_acme_user_home | default(omit) is defined
|
||||||
tags: [ 'pki', 'ssl', 'letsencrypt' ]
|
tags: [ 'pki', 'ssl', 'letsencrypt' ]
|
||||||
|
@ -29,27 +31,42 @@
|
||||||
command: openssl req -x509 -newkey rsa:2048 -keyout {{ letsencrypt_acme_user_home | default(omit) }}/keys/fakeselfsignedcert/privkey -out {{ letsencrypt_acme_user_home | default(omit) }}/certs/fakeselfsignedcert/cert -days 10 -nodes -subj '/CN=self signed certificate'
|
command: openssl req -x509 -newkey rsa:2048 -keyout {{ letsencrypt_acme_user_home | default(omit) }}/keys/fakeselfsignedcert/privkey -out {{ letsencrypt_acme_user_home | default(omit) }}/certs/fakeselfsignedcert/cert -days 10 -nodes -subj '/CN=self signed certificate'
|
||||||
args:
|
args:
|
||||||
creates: '{{ letsencrypt_acme_user_home | default(omit) }}/certs/fakeselfsignedcert/cert'
|
creates: '{{ letsencrypt_acme_user_home | default(omit) }}/certs/fakeselfsignedcert/cert'
|
||||||
when: ( true_cert.stat.islnk is not defined ) and ( letsencrypt_acme_install is defined and letsencrypt_acme_install )
|
when:
|
||||||
|
- true_cert is defined
|
||||||
|
- true_cert.stat is defined
|
||||||
|
- ( true_cert.stat.islnk is not defined ) and ( letsencrypt_acme_install is defined and letsencrypt_acme_install )
|
||||||
tags: [ 'pki', 'ssl', 'letsencrypt' ]
|
tags: [ 'pki', 'ssl', 'letsencrypt' ]
|
||||||
|
|
||||||
- name: When we are going to install letsencrypt certificates, create a preliminary path and a self signed cert. Now the symbolic links for the private key
|
- name: When we are going to install letsencrypt certificates, create a preliminary path and a self signed cert. Now the symbolic links for the private key
|
||||||
file: src=../../keys/fakeselfsignedcert/privkey dest={{ letsencrypt_acme_user_home | default(omit) }}/certs/fakeselfsignedcert/privkey state=link
|
file: src=../../keys/fakeselfsignedcert/privkey dest={{ letsencrypt_acme_user_home | default(omit) }}/certs/fakeselfsignedcert/privkey state=link
|
||||||
when: ( true_cert.stat.islnk is not defined ) and ( letsencrypt_acme_install is defined and letsencrypt_acme_install )
|
when:
|
||||||
|
- true_cert is defined
|
||||||
|
- true_cert.stat is defined
|
||||||
|
- ( true_cert.stat.islnk is not defined ) and ( letsencrypt_acme_install is defined and letsencrypt_acme_install )
|
||||||
tags: [ 'pki', 'ssl', 'letsencrypt' ]
|
tags: [ 'pki', 'ssl', 'letsencrypt' ]
|
||||||
|
|
||||||
- name: When we are going to install letsencrypt certificates, create a preliminary path and a self signed cert. Now the symbolic links for the chain file
|
- name: When we are going to install letsencrypt certificates, create a preliminary path and a self signed cert. Now the symbolic links for the chain file
|
||||||
file: src=cert dest={{ letsencrypt_acme_user_home | default(omit) }}/certs/fakeselfsignedcert/chain state=link
|
file: src=cert dest={{ letsencrypt_acme_user_home | default(omit) }}/certs/fakeselfsignedcert/chain state=link
|
||||||
when: ( true_cert.stat.islnk is not defined ) and ( letsencrypt_acme_install is defined and letsencrypt_acme_install )
|
when:
|
||||||
|
- true_cert is defined
|
||||||
|
- true_cert.stat is defined
|
||||||
|
- ( true_cert.stat.islnk is not defined ) and ( letsencrypt_acme_install is defined and letsencrypt_acme_install )
|
||||||
tags: [ 'pki', 'ssl', 'letsencrypt' ]
|
tags: [ 'pki', 'ssl', 'letsencrypt' ]
|
||||||
|
|
||||||
- name: When we are going to install letsencrypt certificates, create a preliminary path and a self signed cert. Now the symbolic links for the fullchain file
|
- name: When we are going to install letsencrypt certificates, create a preliminary path and a self signed cert. Now the symbolic links for the fullchain file
|
||||||
file: src=cert dest={{ letsencrypt_acme_user_home | default(omit) }}/certs/fakeselfsignedcert/fullchain state=link
|
file: src=cert dest={{ letsencrypt_acme_user_home | default(omit) }}/certs/fakeselfsignedcert/fullchain state=link
|
||||||
when: ( true_cert.stat.islnk is not defined ) and ( letsencrypt_acme_install is defined and letsencrypt_acme_install )
|
when:
|
||||||
|
- true_cert is defined
|
||||||
|
- true_cert.stat is defined
|
||||||
|
- ( true_cert.stat.islnk is not defined ) and ( letsencrypt_acme_install is defined and letsencrypt_acme_install )
|
||||||
tags: [ 'pki', 'ssl', 'letsencrypt' ]
|
tags: [ 'pki', 'ssl', 'letsencrypt' ]
|
||||||
|
|
||||||
- name: When we are going to install letsencrypt certificates, create a preliminary path and a self signed cert. Now the symbolic links for the certificate if there is not one
|
- name: When we are going to install letsencrypt certificates, create a preliminary path and a self signed cert. Now the symbolic links for the certificate if there is not one
|
||||||
file: src=../certs/fakeselfsignedcert dest={{ letsencrypt_acme_user_home | default(omit) }}/live/{{ ansible_fqdn }} state=link
|
file: src=../certs/fakeselfsignedcert dest={{ letsencrypt_acme_user_home | default(omit) }}/live/{{ ansible_fqdn }} state=link
|
||||||
when: ( true_cert.stat.islnk is not defined ) and ( letsencrypt_acme_install is defined and letsencrypt_acme_install )
|
when:
|
||||||
|
- true_cert is defined
|
||||||
|
- true_cert.stat is defined
|
||||||
|
- ( true_cert.stat.islnk is not defined ) and ( letsencrypt_acme_install is defined and letsencrypt_acme_install )
|
||||||
tags: [ 'pki', 'ssl', 'letsencrypt' ]
|
tags: [ 'pki', 'ssl', 'letsencrypt' ]
|
||||||
|
|
||||||
- name: When we are going to install letsencrypt certificates, create a preliminary path and a self signed cert. Now handle the haproxy special case
|
- name: When we are going to install letsencrypt certificates, create a preliminary path and a self signed cert. Now handle the haproxy special case
|
||||||
|
|
Loading…
Reference in New Issue