zen_rev_proxy/tasks/main.yml
Chris Hammer bd82ec227c 0.1.4-DEV-20191031-074215
-------------------------
    * ADD:
      - added client_max_body_size in proxy_site.j2 template so sites may permit uploads of larger files

    * MODIFY:
      - modified several sites to make use of client_max_body_size option
2019-10-31 07:42:49 -04:00

53 lines
1.0 KiB
YAML

---
# tasks file for zen_rev_proxy
- name: install nginx/aptitude for debian nodes
package:
name : ['nginx','aptitude']
state : present
when : ansible_distribution == "Debian"
- name: install nginx for centos nodes
package:
name : nginx
state : present
when: ansible_distribution == "CentOS"
- name: enable nginx at boot time
service:
name : nginx
enabled : yes
when: ansible_virtualization_type != "docker"
- name: create conf.d directory
file:
path : "{{ proxy_site_conf_dir }}"
state : directory
mode : 0755
- name: create log directory
file:
path : "{{ proxy_site_log_path }}"
state : directory
mode : 0755
- name: write configuration file(s)
template:
src : proxy_site.j2
dest : "{{ proxy_site_conf_dir }}/{{ item.key }}.conf"
mode : 0644
with_dict:
- "{{ proxy_sites }}"
notify: restart nginx
- name: start nginx
service:
name : nginx
state : started
when: ansible_virtualization_type != "docker"