File tree Expand file tree Collapse file tree 8 files changed +18
-12
lines changed Expand file tree Collapse file tree 8 files changed +18
-12
lines changed Original file line number Diff line number Diff line change @@ -10,10 +10,13 @@ nginx_start: true
10
10
# Print NGINX configuration file to terminal after executing playbook.
11
11
nginx_debug_output : false
12
12
13
- # Specify which version of NGINX you want to install.
13
+ # Specify which type of NGINX you want to install.
14
14
# Options are 'opensource' or 'plus'.
15
15
# Default is 'opensource'.
16
16
nginx_type : opensource
17
+ # Specify which version of NGINX you want to install.
18
+ # Default is empty.
19
+ # nginx_version: =19-1~bionic
17
20
18
21
# Specify repository origin for NGINX Open Source.
19
22
# Options are 'nginx_repository' or 'os_repository'.
Original file line number Diff line number Diff line change @@ -12,8 +12,6 @@ platforms:
12
12
volume_mounts :
13
13
- " /sys/fs/cgroup:/sys/fs/cgroup:rw"
14
14
command : " /usr/sbin/init"
15
- - name : debian-jessie
16
- image : debian:jessie
17
15
- name : debian-stretch
18
16
image : debian:stretch
19
17
- name : debian-buster
Original file line number Diff line number Diff line change 1
1
---
2
2
- name : Converge
3
3
hosts : all
4
+ pre_tasks :
5
+ - name : " Set repo if Debian"
6
+ set_fact :
7
+ version : " =1.17.4-1~{{ ansible_distribution_release }}"
8
+ when : ansible_os_family == "Debian"
9
+ - name : " Set repo if RedHat"
10
+ set_fact :
11
+ version : " -1.17.4-1.el{{ ansible_distribution_major_version }}.ngx"
12
+ when : ansible_os_family == "RedHat"
4
13
roles :
5
14
- role : ansible-role-nginx
15
+ vars :
16
+ nginx_version : " {{ version }}"
Original file line number Diff line number Diff line change @@ -15,8 +15,6 @@ platforms:
15
15
volume_mounts :
16
16
- " /sys/fs/cgroup:/sys/fs/cgroup:rw"
17
17
command : " /usr/sbin/init"
18
- - name : debian-jessie
19
- image : debian:jessie
20
18
- name : debian-stretch
21
19
image : debian:stretch
22
20
- name : debian-buster
Original file line number Diff line number Diff line change @@ -15,8 +15,6 @@ platforms:
15
15
volume_mounts :
16
16
- " /sys/fs/cgroup:/sys/fs/cgroup:rw"
17
17
command : " /usr/sbin/init"
18
- - name : debian-jessie
19
- image : debian:jessie
20
18
- name : debian-stretch
21
19
image : debian:stretch
22
20
- name : debian-buster
Original file line number Diff line number Diff line change @@ -12,8 +12,6 @@ platforms:
12
12
volume_mounts :
13
13
- " /sys/fs/cgroup:/sys/fs/cgroup:rw"
14
14
command : " /usr/sbin/init"
15
- - name : debian-jessie
16
- image : debian:jessie
17
15
- name : debian-stretch
18
16
image : debian:stretch
19
17
- name : debian-buster
Original file line number Diff line number Diff line change 16
16
17
17
- name : " (Install: Debian/Ubuntu/CentOS/RedHat) Install NGINX"
18
18
package :
19
- name : nginx
19
+ name : " nginx{{ nginx_version | default('') }} "
20
20
state : present
21
21
when : ansible_os_family != "FreeBSD"
22
22
notify : " (Handler: All OSs) Start NGINX"
32
32
33
33
- name : " (Install: Debian/Ubuntu/CentOS/RedHat/FreeBSD) Install NGINX"
34
34
package :
35
- name : nginx
35
+ name : " nginx{{ nginx_version | default('') }} "
36
36
state : present
37
37
when : nginx_install_from == "os_repository"
38
38
notify : " (Handler: All OSs) Start NGINX"
Original file line number Diff line number Diff line change 18
18
19
19
- name : " (Install: All OSs) Install NGINX Plus"
20
20
package :
21
- name : nginx-plus
21
+ name : " nginx-plus{{ nginx_version | default('') }} "
22
22
state : present
23
23
notify : " (Handler: All OSs) Start NGINX"
You can’t perform that action at this time.
0 commit comments