From 88e26ff0f484074442250f96d9de1665ff5b1be5 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Wed, 29 Jun 2016 17:13:42 +0200 Subject: [PATCH] library/roles/nginx/tasks/nginx.yml: Add support for the Ubuntu nginx ppa. Disabled by default. --- nginx/tasks/nginx.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/nginx/tasks/nginx.yml b/nginx/tasks/nginx.yml index ef09fa6a..f42e46ec 100644 --- a/nginx/tasks/nginx.yml +++ b/nginx/tasks/nginx.yml @@ -1,6 +1,11 @@ --- +- name: Install the Ubuntu PPA for nginx + apt_repository: repo='{{ nginx_ppa_repo }}' + when: nginx_use_ppa + tags: [ 'nginx', 'nginx_ppa' ] + - name: Install the nginx web server - apt: pkg={{ item }} state=installed + apt: pkg={{ item }} state={{ nginx_package_state }} update_cache=yes with_items: - nginx-full when: not nginx_use_ldap_pam_auth @@ -24,14 +29,3 @@ notify: Reload nginx tags: [ 'nginx', 'nginx_conf' ] -- name: Ensure that the webserver is running and enabled at boot time - service: name=nginx state=started enabled=yes - when: nginx_enabled - ignore_errors: True - tags: nginx - -- name: Ensure that the webserver is stopped and disabled - service: name=nginx state=stopped enabled=no - when: not nginx_enabled - ignore_errors: True - tags: nginx