Skip to content

Commit

Permalink
implement snakeoil certificates (faster)
Browse files Browse the repository at this point in the history
  • Loading branch information
ansibleguy committed May 15, 2024
1 parent b679f56 commit b19aae8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tasks/debian/add_certs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
locality: "{{ site.ssl.ca.locality | default(NGINX_CONFIG.ssl.ca.locality, true) }}"
email: "{{ site.ssl.ca.email | default(NGINX_CONFIG.ssl.ca.email, true) }}"
pwd: "{{ site.ssl.ca.pwd | default(NGINX_CONFIG.ssl.ca.pwd, true) }}"
when: "site.ssl.mode in ['ca', 'selfsigned']"
when: "site.ssl.mode in ['ca', 'selfsigned', 'snakeoil', 'quick']"
args:
apply:
tags: [certs, sites]
Expand Down
2 changes: 1 addition & 1 deletion tasks/debian/add_site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
ansible.builtin.import_tasks: add_certs.yml
when:
- not site.plain_only | bool
- "site.ssl.mode in ['selfsigned', 'existing', 'ca']"
- "site.ssl.mode in ['selfsigned', 'existing', 'ca', 'snakeoil', 'quick']"
tags: [certs]

# as letsencrypt generator could be skipped on previous run
Expand Down
2 changes: 1 addition & 1 deletion tasks/debian/rm_site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
- "{{ NGINX_CONFIG.ssl.path }}/{{ name }}.crt"
- "{{ NGINX_CONFIG.ssl.path }}/{{ name }}.key"
- "{{ NGINX_CONFIG.ssl.path }}/{{ name }}.csr"
when: "site.ssl.mode in ['selfsigned', 'existing', 'ca']"
when: "site.ssl.mode in ['selfsigned', 'existing', 'ca', 'snakeoil', 'quick']"

- name: "Nginx | Remove Site '{{ name }}' | Removing basic-auth files"
ansible.builtin.file:
Expand Down
2 changes: 1 addition & 1 deletion templates/etc/nginx/sites-available/inc/site_https_ssl.j2
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
ssl_trusted_certificate '{{ NGINX_CONFIG.ssl.path }}/ca.crt';
ssl_stapling off;
ssl_stapling_verify off;
{% elif site.ssl.mode == 'selfsigned' %}
{% elif site.ssl.mode in ['selfsigned', 'snakeoil', 'quick'] %}
ssl_stapling off;
ssl_stapling_verify off;
{% else %}
Expand Down

0 comments on commit b19aae8

Please sign in to comment.