ansible-role-nginx/tasks/unit/install-modules.yml
Alessandro Fael Garcia 857ba8c899
Replace with_items with loop (#282)
`loop` is now the recommended way to loop through lists instead of `with_items`
2020-07-08 14:55:15 +02:00

17 lines
511 B
YAML

---
- name: "(Install: Debian/Ubuntu/CentOS/RedHat) Install NGINX Unit Modules"
package:
name: "{{ item }}"
state: present
loop: "{{ nginx_unit_modules }}"
when: ansible_os_family != "FreeBSD"
notify: "(Handler: Debian/Ubuntu/CentOS/RedHat) Start NGINX Unit"
- name: "(Install: FreeBSD) Install NGINX Unit Modules"
portinstall:
name: "{{ item }}"
state: present
loop: "{{ nginx_unit_modules }}"
when: ansible_os_family == "FreeBSD"
notify: "(Handler: FreeBSD) Start NGINX Unit"