ansible-nginx/tasks/dyn_modules.yml

17 lines
551 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'
# TODO: manage freebsd