ansible-role-nginx/tasks/opensource/setup-debian.yml
Alessandro Fael Garcia f6c48c12d6
Add Alpine tests to all molecule scenarios (#191)
* Use distro specific Ansible modules to install NGINX

* Install NGINX directly in Alpine distributions from the official repository to avoid naming conflicts

* Set travis_wait parameter to max timeout setting
2019-11-24 02:10:55 +01:00

26 lines
936 B
YAML

---
- name: "(Install: Debian/Ubuntu) Set Default APT NGINX Repository"
set_fact:
default_repository:
- >-
deb https://nginx.org/packages/{{ (nginx_branch == 'mainline')
| ternary('mainline/', '') }}{{ ansible_distribution | lower }}/ {{ ansible_distribution_release }} nginx
- >-
deb-src https://nginx.org/packages/{{ (nginx_branch == 'mainline')
| ternary('mainline/', '') }}{{ ansible_distribution | lower }}/ {{ ansible_distribution_release }} nginx
- name: "(Install: Debian/Ubuntu) Set APT NGINX Repository"
set_fact:
repository: "{{ nginx_repository | default(default_repository) }}"
- name: "(Install: Debian/Ubuntu) Add NGINX Repository"
apt_repository:
repo: "{{ item }}"
with_items:
- "{{ repository }}"
- name: "(Install: Debian/Ubuntu) Install NGINX"
apt:
name: "nginx{{ nginx_version | default('') }}"
notify: "(Handler: All OSs) Start NGINX"