Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Allow to use SSL keypair given by path only #14

Merged
merged 3 commits into from
Oct 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,12 @@ Content of SSL/TLS certificate (**required**).
```yaml
zammad_ssl_key:
```
Content of SSL/TLS private key (**required**).
Content of SSL/TLS private key (**required**).
**Please note:** In the special case, that you previously put an SSL keypair
on the host, e.g. via Let's Encrypt, you must not configure the variables
`zammad_ssl_cert` and `zammad_ssl_key`. Nevertheless, in each case the role will
validate, if the SSL key pair is given under the paths `zammad_ssl_key_path` and
`zammad_ssl_cert_path` are valid.

```yaml
zammad_nginx_additional_server_configs:
Expand Down
3 changes: 0 additions & 3 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ zammad_nginx_config_path: "/etc/nginx/sites-available/zammad.conf"
zammad_ssl_cert_path: "/etc/ssl/certs/zammad_cert.pem"
zammad_ssl_key_path: "/etc/ssl/private/zammad_key.pem"

zammad_ssl_key:
zammad_ssl_cert:

zammad_nginx_additional_server_configs: []

elasticsearch_url: "http://localhost:9200"
Expand Down
2 changes: 2 additions & 0 deletions tasks/ssl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
mode: 0640
owner: root
group: root
when: zammad_ssl_key is defined or zammad_ssl_key|length > 0

- name: SSL | Insert certificate
blockinfile:
Expand All @@ -19,6 +20,7 @@
mode: 0644
owner: root
group: root
when: zammad_ssl_cert is defined or zammad_ssl_cert|length > 0

- name: SSL | Check if certificate is still valid, ignoring failures
openssl_certificate_info:
Expand Down