File tree Expand file tree Collapse file tree 6 files changed +31
-14
lines changed Expand file tree Collapse file tree 6 files changed +31
-14
lines changed Original file line number Diff line number Diff line change 4
4
pre_tasks :
5
5
- name : Set repo if Debian
6
6
ansible.builtin.set_fact :
7
- version : " =1.20.2 -1~{{ ansible_facts['distribution_release'] }}"
7
+ version : " =1.22.0 -1~{{ ansible_facts['distribution_release'] }}"
8
8
when : ansible_facts['os_family'] == "Debian"
9
9
- name : Set repo if Red Hat
10
10
ansible.builtin.set_fact :
11
- version : " -1.20.2 -1.{{ (ansible_facts['distribution'] == 'Amazon') | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx"
11
+ version : " -1.22.0 -1.{{ (ansible_facts['distribution'] == 'Amazon') | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx"
12
12
when : ansible_facts['os_family'] == "RedHat"
13
13
tasks :
14
14
- name : Install NGINX
Original file line number Diff line number Diff line change @@ -69,6 +69,13 @@ platforms:
69
69
volumes :
70
70
- " /sys/fs/cgroup:/sys/fs/cgroup:rw"
71
71
command : " /sbin/init"
72
+ - name : ubuntu-jammy
73
+ image : ubuntu:jammy
74
+ dockerfile : ../common/Dockerfile.j2
75
+ privileged : true
76
+ volumes :
77
+ - " /sys/fs/cgroup:/sys/fs/cgroup:rw"
78
+ command : " /sbin/init"
72
79
provisioner :
73
80
name : ansible
74
81
playbooks :
Original file line number Diff line number Diff line change 2
2
- name : Prepare
3
3
hosts : all
4
4
pre_tasks :
5
- - name : Set repo if Alpine
6
- ansible.builtin.set_fact :
7
- version : " =1.21.5-r1"
8
- when : ansible_facts['os_family'] == "Alpine"
9
5
- name : Set repo if Debian
10
6
ansible.builtin.set_fact :
11
- version : " =1.21.5 -1~{{ ansible_facts['distribution_release'] }}"
7
+ version : " =1.23.0 -1~{{ ansible_facts['distribution_release'] }}"
12
8
when : ansible_facts['os_family'] == "Debian"
13
9
- name : Set repo if Red Hat
14
10
ansible.builtin.set_fact :
15
- version : " -1.21.6 -1.{{ (ansible_facts['distribution'] == 'Amazon') | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx"
11
+ version : " -1.23.0 -1.{{ (ansible_facts['distribution'] == 'Amazon') | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx"
16
12
when : ansible_facts['os_family'] == "RedHat"
17
13
tasks :
18
14
- name : Install NGINX
Original file line number Diff line number Diff line change 24
24
url : http://localhost
25
25
status_code : 200
26
26
27
+ - name : Fetch NGINX version
28
+ ansible.builtin.uri :
29
+ url : https://version.nginx.com/nginx/stable
30
+ return_content : true
31
+ check_mode : false
32
+ register : nginx_versions
33
+
34
+ - name : Set NGINX version
35
+ ansible.builtin.set_fact :
36
+ nginx_version : " {{ nginx_versions.content | regex_search('([0-9]+\\ .){2}[0-9]+') }}"
37
+
27
38
- name : Verify NGINX has been downgraded
28
39
ansible.builtin.command : nginx -v
29
40
args :
30
41
chdir : " {{ ((ansible_facts['system'] | lower is not search('bsd')) | ternary('/etc/nginx', '/usr/local/sbin')) }}"
31
42
changed_when : false
32
43
register : version
33
- failed_when : version is not search('1.20.2' )
44
+ failed_when : version is not search(nginx_version )
Original file line number Diff line number Diff line change @@ -69,6 +69,13 @@ platforms:
69
69
volumes :
70
70
- " /sys/fs/cgroup:/sys/fs/cgroup:rw"
71
71
command : " /sbin/init"
72
+ - name : ubuntu-jammy
73
+ image : ubuntu:jammy
74
+ dockerfile : ../common/Dockerfile.j2
75
+ privileged : true
76
+ volumes :
77
+ - " /sys/fs/cgroup:/sys/fs/cgroup:rw"
78
+ command : " /sbin/init"
72
79
provisioner :
73
80
name : ansible
74
81
playbooks :
Original file line number Diff line number Diff line change 2
2
- name : Prepare
3
3
hosts : all
4
4
pre_tasks :
5
- - name : Set repo if Alpine
6
- ansible.builtin.set_fact :
7
- version : " =1.21.5-r1"
8
- when : ansible_facts['os_family'] == "Alpine"
9
5
- name : Set repo if Debian
10
6
ansible.builtin.set_fact :
11
- version : " =1.21.5 -1~{{ ansible_facts['distribution_release'] }}"
7
+ version : " =1.21.6 -1~{{ ansible_facts['distribution_release'] }}"
12
8
when : ansible_facts['os_family'] == "Debian"
13
9
- name : Set repo if Red Hat
14
10
ansible.builtin.set_fact :
You can’t perform that action at this time.
0 commit comments