mirror of
https://github.com/geerlingguy/ansible-role-nginx.git
synced 2025-02-16 01:11:29 +01:00
21 lines
481 B
YAML
21 lines
481 B
YAML
---
|
|
- name: Ensure dirmngr is installed (gnupg dependency).
|
|
apt:
|
|
name: dirmngr
|
|
state: present
|
|
|
|
- name: Add PPA for Nginx (if configured).
|
|
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 is changed
|
|
tags: ['skip_ansible_lint']
|