add missing deps to create selfsigned certificate (#19)
Co-authored-by: meaz <meaz@disroot.org> Co-authored-by: muppeth <muppeth@no-reply@disroot.org> Reviewed-on: #19 Reviewed-by: antilopa <antilopa@no-reply@disroot.org> Reviewed-by: muppeth <muppeth@no-reply@disroot.org>
This commit is contained in:
parent
04672b22fa
commit
68ffa6c51d
2 changed files with 45 additions and 14 deletions
|
@ -47,6 +47,17 @@ nginx_http_gzip_types: 'text/plain text/css application/json application/x-javas
|
|||
nginx_http_gzip_vary: 'on'
|
||||
nginx_http_gzip_disable: '"msie6"'
|
||||
|
||||
## Self signed certificates
|
||||
nginx_selfsigned_deps:
|
||||
- build-essential
|
||||
- libssl-dev
|
||||
- libffi-dev
|
||||
- python-dev
|
||||
- git
|
||||
- dialog
|
||||
- libaugeas0
|
||||
- ca-certificates
|
||||
|
||||
nginx_gen_dh: 'false'
|
||||
nginx_dh_path: '{{ nginx_ssl_dir }}/dhparam.pem'
|
||||
nginx_dh_length: 4096
|
||||
|
|
|
@ -49,6 +49,27 @@
|
|||
when: item.copy_ssl is defined
|
||||
notify: reload nginx
|
||||
|
||||
- name: "[SELFSIGNED] - Install dependencies"
|
||||
apt:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
with_items: "{{ nginx_selfsigned_deps }}"
|
||||
when: item.selfsigned is defined and item.selfsigned == 'true'
|
||||
|
||||
- name: "[SELFSIGNED] - Add python2 cryptography module"
|
||||
apt:
|
||||
name: python-cryptography
|
||||
state: present
|
||||
with_items: "{{ nginx_vhosts }}"
|
||||
when: item.selfsigned is defined and item.selfsigned == 'true' and ansible_python.executable == '/usr/bin/python'
|
||||
|
||||
- name: "[SELFSIGNED] - Add python3 cryptography module"
|
||||
apt:
|
||||
name: python3-cryptography
|
||||
state: present
|
||||
with_items: "{{ nginx_vhosts }}"
|
||||
when: item.selfsigned is defined and item.selfsigned == 'true' and ansible_python.executable == '/usr/bin/python3'
|
||||
|
||||
- name: "[SELFSIGNED] - Create Key folder"
|
||||
file:
|
||||
path: "{{ nginx_ssl_dir }}/{{ item.ssl_name }}"
|
||||
|
@ -58,7 +79,6 @@
|
|||
when: item.selfsigned is defined and item.selfsigned == 'true'
|
||||
notify: reload nginx
|
||||
|
||||
|
||||
- name: '[SELFSIGNED] - Create a self-signed key'
|
||||
openssl_privatekey:
|
||||
path: '{{ ssl_src_path }}/{{ item.ssl_name }}/privkey.pem'
|
||||
|
|
Loading…
Reference in a new issue