ansible-role-nginx/tasks/config/upload-config.yml

108 lines
3.3 KiB
YAML
Raw Normal View History

2020-09-15 21:27:06 +02:00
## DEPRECATED -- Use nginxinc.nginx_config role instead (https://github.com/nginxinc/ansible-role-nginx-config)
---
2020-09-15 21:27:06 +02:00
- name: "Deprecation warning"
debug:
msg: "DEPRECATED TASKS -- Use nginxinc.nginx_config role instead (https://github.com/nginxinc/ansible-role-nginx-config)"
- name: "(DEPRECATED) Ensure NGINX HTML Directory Exists"
file:
path: "{{ nginx_html_upload_dest | default('/usr/share/nginx/html') }}"
state: directory
mode: 0755
when: nginx_html_upload_enable | bool
2020-09-15 21:27:06 +02:00
- name: "(DEPRECATED) Upload NGINX HTML Files"
copy:
src: "{{ item }}"
dest: "{{ nginx_html_upload_dest | default('/usr/share/nginx/html') }}"
backup: yes
mode: 0644
with_fileglob: "{{ nginx_html_upload_src }}"
when: nginx_html_upload_enable | bool
2020-09-17 17:00:27 +02:00
notify: "(Handler) Run NGINX"
2020-09-15 21:27:06 +02:00
- name: "(DEPRECATED) Ensure NGINX Main Directory Exists"
file:
path: "{{ nginx_main_upload_dest | default('/etc/nginx/') }}"
state: directory
mode: 0755
when: nginx_main_upload_enable | bool
2020-09-15 21:27:06 +02:00
- name: "(DEPRECATED) Upload NGINX Main Configuration File"
copy:
src: "{{ nginx_main_upload_src | default('conf/nginx.conf') }}"
dest: "{{ nginx_main_upload_dest | default('/etc/nginx/') }}"
backup: yes
mode: 0644
when: nginx_main_upload_enable | bool
2020-09-17 17:00:27 +02:00
notify: "(Handler) Run NGINX"
2020-09-15 21:27:06 +02:00
- name: "(DEPRECATED) Ensure NGINX HTTP Directory Exists"
file:
path: "{{ nginx_http_upload_dest | default('/etc/nginx/conf.d/') }}"
state: directory
mode: 0755
when: nginx_http_upload_enable | bool
2020-09-15 21:27:06 +02:00
- name: "(DEPRECATED) Upload NGINX HTTP Configuration Files"
copy:
src: "{{ item }}"
dest: "{{ nginx_http_upload_dest | default('/etc/nginx/conf.d/') }}"
backup: yes
mode: 0644
with_fileglob: "{{ nginx_http_upload_src }}"
when: nginx_http_upload_enable | bool
2020-09-17 17:00:27 +02:00
notify: "(Handler) Run NGINX"
2020-09-15 21:27:06 +02:00
- name: "(DEPRECATED) Ensure NGINX Stream Directory Exists"
file:
path: "{{ nginx_stream_upload_dest | default('/etc/nginx/conf.d/') }}"
state: directory
mode: 0755
when: nginx_stream_upload_enable | bool
2020-09-15 21:27:06 +02:00
- name: "(DEPRECATED) Upload NGINX Stream Configuration Files"
copy:
src: "{{ item }}"
dest: "{{ nginx_stream_upload_dest | default('/etc/nginx/conf.d/') }}"
backup: yes
mode: 0644
with_fileglob: "{{ nginx_stream_upload_src }}"
when: nginx_stream_upload_enable | bool
2020-09-17 17:00:27 +02:00
notify: "(Handler) Run NGINX"
2020-09-15 21:27:06 +02:00
- name: "(DEPRECATED) Ensure SSL Certificate Directory Exists"
file:
path: "{{ nginx_ssl_crt_upload_dest | default('/etc/ssl/certs/') }}"
state: directory
mode: 0755
when: nginx_ssl_upload_enable | bool
2020-09-15 21:27:06 +02:00
- name: "(DEPRECATED) Ensure SSL Key Directory Exists"
file:
path: "{{ nginx_ssl_key_upload_dest | default('/etc/ssl/private/') }}"
state: directory
mode: 0755
when: nginx_ssl_upload_enable | bool
2020-09-15 21:27:06 +02:00
- name: "(DEPRECATED) Upload NGINX SSL Certificates"
copy:
src: "{{ item }}"
dest: "{{ nginx_ssl_crt_upload_dest | default('/etc/ssl/certs/') }}"
decrypt: yes
backup: yes
mode: 0640
with_fileglob: "{{ nginx_ssl_crt_upload_src }}"
when: nginx_ssl_upload_enable | bool
2020-09-15 21:27:06 +02:00
- name: "(DEPRECATED) Upload NGINX SSL Keys"
copy:
src: "{{ item }}"
dest: "{{ nginx_ssl_key_upload_dest | default('/etc/ssl/private/') }}"
decrypt: yes
backup: yes
mode: 0640
with_fileglob: "{{ nginx_ssl_key_upload_src }}"
no_log: yes
when: nginx_ssl_upload_enable | bool