Install modules just after nginx
parent
bb74ac804e
commit
45886ca9cc
|
@ -1,26 +0,0 @@
|
|||
---
|
||||
|
||||
- name: FAIL | If Dynamic module is not available
|
||||
fail:
|
||||
msg: "{{ item }} dynamic module is not available"
|
||||
with_items: "{{ nginx_dyn_modules }}"
|
||||
when: item + '=dynamic' not in nginx_modules
|
||||
|
||||
- name: APT | Install nginx modules
|
||||
apt:
|
||||
pkg: "libnginx-mod-{{ item | replace('_', '-') }}"
|
||||
state: present
|
||||
default_release: "{{ ansible_distribution_release + '-backports' if nginx_backports else ansible_distribution_release }}"
|
||||
with_items: "{{ nginx_dyn_modules }}"
|
||||
when: ansible_distribution == 'Debian'
|
||||
|
||||
- name: FILE | Creates modules directories
|
||||
file:
|
||||
path: "{{ nginx_etc_dir}}/{{ item }}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
owner: root
|
||||
group: root
|
||||
with_items: ['modules-available', 'modules-enabled']
|
||||
|
||||
# TODO: manage freebsd
|
|
@ -27,6 +27,13 @@
|
|||
state: present
|
||||
default_release: "{{ ansible_distribution_release + '-backports' if nginx_backports else ansible_distribution_release }}"
|
||||
|
||||
- name: APT | Install nginx modules
|
||||
apt:
|
||||
pkg: "libnginx-mod-{{ item | replace('_', '-') }}"
|
||||
state: present
|
||||
with_items: "{{ nginx_dyn_modules }}"
|
||||
when: ansible_distribution == 'Debian'
|
||||
|
||||
- name: APT | Install python-passlib
|
||||
apt:
|
||||
pkg: python-passlib
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
# Role vars
|
||||
nginx_worker_processes: 1 # Ansible+FreeBSD can't detect CPU number
|
||||
nginx_apt_package: 'nginx-extras'
|
||||
nginx_dyn_modules: ['http_geoip']
|
||||
nginx_dyn_modules: ['http_geoip', 'http_headers_more']
|
||||
nginx_upstreams:
|
||||
- name: 'test'
|
||||
servers:
|
||||
|
|
Loading…
Reference in New Issue