parent
3af0b284c1
commit
e818255465
@ -1,11 +1,14 @@ |
|||||||
--- |
--- |
||||||
- name: Add PPA for Nginx. |
- name: Add PPA for Nginx. |
||||||
apt_repository: repo='ppa:nginx/{{ nginx_ppa_version }}' state=present update_cache=yes |
apt_repository: |
||||||
register: added_ppa |
repo: 'ppa:nginx/{{ nginx_ppa_version }}' |
||||||
when: nginx_use_ppa |
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 |
- name: Ensure nginx will reinstall if the PPA was just added. |
||||||
apt: |
apt: |
||||||
pkg: nginx |
name: nginx |
||||||
state: absent |
state: absent |
||||||
when: added_ppa.changed |
when: nginx_ppa_added.changed |
||||||
|
Reference in new issue