Skip to content

Commit

Permalink
nginx and nginx-extras apt packages cannot be installed at the same t…
Browse files Browse the repository at this point in the history
…ime (on newer Ubuntus), added condition to only pick one
  • Loading branch information
stefanhorning committed Dec 6, 2023
1 parent 12d4b60 commit 44292f1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions tasks/nginx-installation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]

0 comments on commit 44292f1

Please sign in to comment.