Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## 0.25.1 (Unreleased)

FEATURES:

- Add a parameter, `nginx_distribution_package`, to override the default NGINX package name when installing NGINX from your distribution/OS repository.

BUG FIXES:

- Fix Ansible and Jinja versions validation tasks in ansible check mode.
Expand Down
15 changes: 9 additions & 6 deletions defaults/main/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ nginx_manage_repo: true
# Default is nginx_repository.
nginx_install_from: nginx_repository

# (Optional) Specify repository for NGINX Open Source or NGINX Plus.
# Only works if 'install_from' is set to 'nginx_repository' when installing NGINX Open Source.
# Defaults are the official NGINX repositories.
# nginx_repository: deb https://nginx.org/packages/mainline/debian/ buster nginx

# Specify source install options for NGINX Open Source.
# Options represent whether to install from source also or to install from packages (default).
# These only apply if 'nginx_install_from' is set to 'source'.
Expand All @@ -57,22 +62,20 @@ nginx_install_source_pcre: false
nginx_install_source_openssl: true
nginx_install_source_zlib: false

# Specify source install module for NGINX Open Source.
# Specify source install modules for NGINX Open Source.
# You can select any of the static modules listed on http://nginx.org/en/docs/configure.html.
# Format is '--with-*' where '*' should be used as static module name in the list below. (see an example below).
# Default is 'http_ssl_module'. (DO NOT remove it if you need SSL support).
nginx_static_modules: [http_ssl_module]
# nginx_static_modules: ['http_v2_module'] # Example for '--with-http_v2_module'

# (Optional) Specify NGINX package name when installing nginx from an 'os_repository'.
# nginx_distribution_package: @nginx:1.24/common

# (Optional) Choose where to fetch the NGINX signing key from.
# Default is the official NGINX signing key host.
# nginx_signing_key: http://nginx.org/keys/nginx_signing.key

# (Optional) Specify repository for NGINX Open Source or NGINX Plus.
# Only works if 'install_from' is set to 'nginx_repository' when installing NGINX Open Source.
# Defaults are the official NGINX repositories.
# nginx_repository: deb https://nginx.org/packages/mainline/debian/ buster nginx

# Specify which branch of NGINX Open Source you want to install.
# Options are 'mainline' or 'stable'.
# Only works if 'install_from' is set to 'nginx_repository' or 'source'.
Expand Down
6 changes: 6 additions & 0 deletions molecule/distribution/converge.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
---
- name: Converge
hosts: all
pre_tasks:
- name: Set package name if Alpine
ansible.builtin.set_fact:
nginx_package_name: "@nginx:1.24/common"
when: ansible_facts['os_family'] == "Alpine"
tasks:
- name: Install NGINX
ansible.builtin.include_role:
name: ansible-role-nginx
vars:
nginx_install_from: os_repository
nginx_distribution_name: "{{ nginx_package_name }}"
2 changes: 1 addition & 1 deletion tasks/opensource/install-distribution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@

- name: "{{ nginx_setup | capitalize }} NGINX from the distribution's package repository"
ansible.builtin.package:
name: nginx{{ nginx_version | default('') }}
name: "{{ nginx_distribution_package | default('nginx' + (nginx_version | default(''))) }}"
state: "{{ nginx_state }}"
notify: (Handler) Run NGINX
Loading