ansible-nginx/tasks/dyn_modules.yml

26 lines
765 B
YAML
Raw Normal View History

2016-10-12 23:13:59 +07:00
---
- 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']
2016-10-12 23:13:59 +07:00
# TODO: manage freebsd