Add option to specify the version of NGINX to install (#177)
And remove outdated Debian Jessie Molecule tests
This commit is contained in:
parent
cca5dbb37d
commit
41aeda300d
@ -10,10 +10,13 @@ nginx_start: true
|
||||
# Print NGINX configuration file to terminal after executing playbook.
|
||||
nginx_debug_output: false
|
||||
|
||||
# Specify which version of NGINX you want to install.
|
||||
# Specify which type of NGINX you want to install.
|
||||
# Options are 'opensource' or 'plus'.
|
||||
# Default is 'opensource'.
|
||||
nginx_type: opensource
|
||||
# Specify which version of NGINX you want to install.
|
||||
# Default is empty.
|
||||
# nginx_version: =19-1~bionic
|
||||
|
||||
# Specify repository origin for NGINX Open Source.
|
||||
# Options are 'nginx_repository' or 'os_repository'.
|
||||
|
@ -12,8 +12,6 @@ platforms:
|
||||
volume_mounts:
|
||||
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
|
||||
command: "/usr/sbin/init"
|
||||
- name: debian-jessie
|
||||
image: debian:jessie
|
||||
- name: debian-stretch
|
||||
image: debian:stretch
|
||||
- name: debian-buster
|
||||
|
@ -1,5 +1,16 @@
|
||||
---
|
||||
- name: Converge
|
||||
hosts: all
|
||||
pre_tasks:
|
||||
- name: "Set repo if Debian"
|
||||
set_fact:
|
||||
version: "=1.17.4-1~{{ ansible_distribution_release }}"
|
||||
when: ansible_os_family == "Debian"
|
||||
- name: "Set repo if RedHat"
|
||||
set_fact:
|
||||
version: "-1.17.4-1.el{{ ansible_distribution_major_version }}.ngx"
|
||||
when: ansible_os_family == "RedHat"
|
||||
roles:
|
||||
- role: ansible-role-nginx
|
||||
vars:
|
||||
nginx_version: "{{ version }}"
|
||||
|
@ -15,8 +15,6 @@ platforms:
|
||||
volume_mounts:
|
||||
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
|
||||
command: "/usr/sbin/init"
|
||||
- name: debian-jessie
|
||||
image: debian:jessie
|
||||
- name: debian-stretch
|
||||
image: debian:stretch
|
||||
- name: debian-buster
|
||||
|
@ -15,8 +15,6 @@ platforms:
|
||||
volume_mounts:
|
||||
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
|
||||
command: "/usr/sbin/init"
|
||||
- name: debian-jessie
|
||||
image: debian:jessie
|
||||
- name: debian-stretch
|
||||
image: debian:stretch
|
||||
- name: debian-buster
|
||||
|
@ -12,8 +12,6 @@ platforms:
|
||||
volume_mounts:
|
||||
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
|
||||
command: "/usr/sbin/init"
|
||||
- name: debian-jessie
|
||||
image: debian:jessie
|
||||
- name: debian-stretch
|
||||
image: debian:stretch
|
||||
- name: debian-buster
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
- name: "(Install: Debian/Ubuntu/CentOS/RedHat) Install NGINX"
|
||||
package:
|
||||
name: nginx
|
||||
name: "nginx{{ nginx_version | default('') }}"
|
||||
state: present
|
||||
when: ansible_os_family != "FreeBSD"
|
||||
notify: "(Handler: All OSs) Start NGINX"
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
- name: "(Install: Debian/Ubuntu/CentOS/RedHat/FreeBSD) Install NGINX"
|
||||
package:
|
||||
name: nginx
|
||||
name: "nginx{{ nginx_version | default('') }}"
|
||||
state: present
|
||||
when: nginx_install_from == "os_repository"
|
||||
notify: "(Handler: All OSs) Start NGINX"
|
||||
|
@ -18,6 +18,6 @@
|
||||
|
||||
- name: "(Install: All OSs) Install NGINX Plus"
|
||||
package:
|
||||
name: nginx-plus
|
||||
name: "nginx-plus{{ nginx_version | default('') }}"
|
||||
state: present
|
||||
notify: "(Handler: All OSs) Start NGINX"
|
||||
|
Loading…
Reference in New Issue
Block a user