ansible-nginx/tasks/install_FreeBSD.yml

27 lines
763 B
YAML

---
- name: PKGNG | Install nginx and related tools
pkgng: name=nginx state=present
with_items:
- nginx
- py27-passlib
- curl
- name: FILE | Create configuration dir (like Debian)
file: path="{{ nginx_etc_dir }}/{{ item }}" state=directory
with_items:
- conf.d
- sites-available
- sites-enabled
- name: FILE | Follow Debian ;)
file: >
src="{{ nginx_etc_dir }}/fastcgi_params"
dest="{{ nginx_etc_dir }}/fastcgi.conf"
state=link
- name: COPY | Populate proxy_params
copy: >
content="proxy_set_header Host $http_host;\nproxy_set_header X-Real-IP $remote_addr;\nproxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;proxy_set_header X-Forwarded-Proto $scheme;"
dest="{{ nginx_etc_dir }}/proxy_params"