mirror of
https://github.com/geerlingguy/ansible-role-nginx.git
synced 2024-11-16 10:35:33 +01:00
3063875875
adds ppa:nginx to apt repositories when nginx_use_ppa is set to yes (default no) nginx_ppa_version can be either "stable" or "development" this will reinstall nginx if ppa was just added to ensure that the ppa version will be installed
12 lines
316 B
YAML
12 lines
316 B
YAML
---
|
|
- name: Add PPA for Nginx.
|
|
apt_repository: repo='ppa:nginx/{{ nginx_ppa_version }}' state=present update_cache=yes
|
|
register: added_ppa
|
|
when: nginx_use_ppa
|
|
|
|
- name: ensure nginx is not installed when the ppa was just added
|
|
apt:
|
|
pkg: nginx
|
|
state: absent
|
|
when: added_ppa.changed
|