infra/roles/nginx-role/tasks/setup-Ubuntu.yml
Sergey Bubnov (omg) 8dc65328a3 new nginx role
2019-06-29 01:27:16 +04:00

16 lines
361 B
YAML

---
- name: Add PPA for Nginx.
apt_repository:
repo: 'ppa:nginx/{{ nginx_ppa_version }}'
state: present
update_cache: true
register: nginx_ppa_added
when: nginx_ppa_use | bool
- name: Ensure nginx will reinstall if the PPA was just added.
apt:
name: nginx
state: absent
when: nginx_ppa_added.changed
tags: ['skip_ansible_lint']