File tree Expand file tree Collapse file tree 9 files changed +18
-7
lines changed Expand file tree Collapse file tree 9 files changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,13 @@ nginx_type: opensource
19
19
# Default is empty.
20
20
# nginx_version: =19-1~bionic
21
21
22
+ # Specify whether you want to maintain your version of NGINX or upgrade to the latest version.
23
+ # Can be used with `nginx_version` to achieve fine tune control on which version of NGINX is installed/used on each playbook execution.
24
+ # Using 'present' will install the latest version (or 'nginx_version') of NGINX on a fresh install.
25
+ # Using 'latest' will upgrade NGINX to the latest version (that matches your 'nginx_version') of NGINX on every playbook execution.
26
+ # Default is present.
27
+ nginx_state : present
28
+
22
29
# Specify repository origin for NGINX Open Source.
23
30
# Options are 'nginx_repository' or 'os_repository'.
24
31
# Only works if 'nginx_type' is set to 'opensource'.
Original file line number Diff line number Diff line change 22
22
- name : " (Install: FreeBSD) Install NGINX package"
23
23
pkgng :
24
24
name : " www/nginx{{ nginx_version | default('') }}"
25
- state : present
25
+ state : " {{ nginx_state }} "
26
26
when : nginx_bsd_install_packages
27
27
notify : " (Handler: All OSs) Start NGINX"
28
28
29
29
- name : " (Install: FreeBSD) Install NGINX port"
30
30
portinstall :
31
31
name : " www/nginx{{ nginx_version | default('') }}"
32
32
use_packages : " {{ nginx_bsd_portinstall_use_packages | default(omit) }}"
33
- state : present
33
+ state : " {{ nginx_state }} "
34
34
when : not nginx_bsd_install_packages
35
35
notify : " (Handler: All OSs) Start NGINX"
36
36
43
43
openbsd_pkg :
44
44
name : " nginx{{ nginx_version | default('') }}"
45
45
build : false
46
- state : present
46
+ state : " {{ nginx_state }} "
47
47
when : nginx_bsd_install_packages
48
48
notify : " (Handler: All OSs) Start NGINX"
49
49
50
50
- name : " (Install: OpenBSD) Install NGINX port"
51
51
openbsd_pkg :
52
52
name : " nginx{{ nginx_version | default('') }}"
53
53
build : true
54
- state : present
54
+ state : " {{ nginx_state }} "
55
55
when : not nginx_bsd_install_packages
56
56
notify : " (Handler: All OSs) Start NGINX"
57
57
Original file line number Diff line number Diff line change 19
19
- name : " (Install: Linux) Install NGINX package"
20
20
package :
21
21
name : " nginx{{ nginx_version | default('') }}"
22
- state : present
22
+ state : " {{ nginx_state }} "
23
23
when : nginx_install_from == "os_repository"
24
24
notify : " (Handler: All OSs) Start NGINX"
Original file line number Diff line number Diff line change 25
25
apk :
26
26
name : " nginx{{ nginx_version | default('') }}"
27
27
repository : " {{ repository }}"
28
+ state : " {{ nginx_state }}"
28
29
notify : " (Handler: All OSs) Start NGINX"
Original file line number Diff line number Diff line change 22
22
- name : " (Install: Debian/Ubuntu) Install NGINX"
23
23
apt :
24
24
name : " nginx{{ nginx_version | default('') }}"
25
+ state : " {{ nginx_state }}"
25
26
notify : " (Handler: All OSs) Start NGINX"
Original file line number Diff line number Diff line change 25
25
- name : " (Install: CentOS/RedHat) Install NGINX"
26
26
yum :
27
27
name : " nginx{{ nginx_version | default('') }}"
28
+ state : " {{ nginx_state }}"
28
29
disablerepo : " *"
29
30
enablerepo : " nginx"
30
31
notify : " (Handler: All OSs) Start NGINX"
Original file line number Diff line number Diff line change 17
17
- name : " (Install: SUSE) Install NGINX"
18
18
zypper :
19
19
name : " nginx{{ nginx_version | default('') }}"
20
+ state : " {{ nginx_state }}"
20
21
notify : " (Handler: All OSs) Start NGINX"
Original file line number Diff line number Diff line change 24
24
- name : " (Install: FreeBSD) Install nginx-plus{{ nginx_version | default('') }}"
25
25
pkgng :
26
26
name : " nginx-plus{{ nginx_version | default('') }}"
27
- state : present
27
+ state : " {{ nginx_state }} "
28
28
notify : " (Handler: All OSs) Start NGINX"
29
29
30
30
when : ansible_system == "FreeBSD"
Original file line number Diff line number Diff line change 14
14
- name : " (Install: Linux) Install NGINX Plus"
15
15
package :
16
16
name : " nginx-plus{{ nginx_version | default('') }}"
17
- state : present
17
+ state : " {{ nginx_state }} "
18
18
notify : " (Handler: All OSs) Start NGINX"
You can’t perform that action at this time.
0 commit comments