diff --git a/defaults/main.yml b/defaults/main.yml index 8160158..f155e87 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -5,6 +5,8 @@ nginx_distribution: nginx nginx_conf_dir: /etc/nginx +nginx_extras_package_install: true + nginx_repo: "deb http://nginx.org/packages/ubuntu {{ ansible_distribution_release }} nginx" nginx_binary_name: nginx diff --git a/tasks/nginx-installation.yml b/tasks/nginx-installation.yml index 79c8c18..5edefab 100644 --- a/tasks/nginx-installation.yml +++ b/tasks/nginx-installation.yml @@ -3,6 +3,14 @@ ansible.builtin.apt: name: - nginx + state: present + when: not nginx_extras_package_install + tags: [packages, nginx] + +- name: Install the nginx-extras package + ansible.builtin.apt: + name: - nginx-extras state: present + when: nginx_extras_package_install tags: [packages, nginx]