forked from geerlingguy/ansible-role-nginx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR geerlingguy#45: Clean up var names and document new feature.
- Loading branch information
1 parent
3af0b28
commit e818255
Showing
3 changed files
with
21 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
--- | ||
- 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: Add PPA for Nginx. | ||
apt_repository: | ||
repo: 'ppa:nginx/{{ nginx_ppa_version }}' | ||
state: present | ||
update_cache: yes | ||
register: nginx_ppa_added | ||
when: nginx_ppa_use | ||
|
||
- name: ensure nginx is not installed when the ppa was just added | ||
apt: | ||
pkg: nginx | ||
state: absent | ||
when: added_ppa.changed | ||
- name: Ensure nginx will reinstall if the PPA was just added. | ||
apt: | ||
name: nginx | ||
state: absent | ||
when: nginx_ppa_added.changed |