made snake oil certificate option optional

This commit is contained in:
nd 2020-04-30 20:01:35 +02:00
parent 6781423adf
commit 94bd2eabac
No known key found for this signature in database
GPG key ID: 21B5CD4DEE3670E9
3 changed files with 5 additions and 1 deletions

View file

@ -29,6 +29,9 @@ maps: {}
# force all traffic on ssl, except letsencrypt challenges # force all traffic on ssl, except letsencrypt challenges
force_ssl: True force_ssl: True
# generate a self signed certificate as default ssl cert
snakeoil_default: False
# install php-fpm, setup a php-handler upstream and copy a php location snippet to include in configs # install php-fpm, setup a php-handler upstream and copy a php location snippet to include in configs
# either "False", "True" or a dict *phpconfig*, see below for definition # either "False", "True" or a dict *phpconfig*, see below for definition
php: False php: False

View file

@ -6,6 +6,7 @@ nginx:
monitoring: true monitoring: true
php: false php: false
force_ssl: true force_ssl: true
snakeoil_default: false
upstreams: {} upstreams: {}
vhosts: {} vhosts: {}
maps: {} maps: {}

View file

@ -8,7 +8,7 @@
name: certificates name: certificates
vars: vars:
certificates: certificates:
certs: "{{ {}|combine(selfsigned_cert|from_yaml, nginx_certs, inventory_certs, recursive=True) }}" certs: "{{ {}|combine( (selfsigned_cert|from_yaml if nginx.snakeoil_default else {}), nginx_certs, inventory_certs, recursive=True) }}"
- debug: - debug:
verbosity: 1 verbosity: 1