Skip to content

Commit 62acc03

Browse files
Bump ansible-lint from 6.5.2 to 6.7.0 in /.github/workflows/requirements (#550)
1 parent b55f21e commit 62acc03

File tree

17 files changed

+110
-108
lines changed

17 files changed

+110
-108
lines changed

.ansible-lint

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
---
22
skip_list:
3+
- name[template]
34
- yaml[line-length]
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ansible-core==2.13.4
22
jinja2==3.1.2
3-
ansible-lint==6.5.2
3+
ansible-lint==6.7.0
44
yamllint==1.28.0
55
molecule[docker]==4.0.1
66
docker==6.0.0

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ TESTS:
2929
* Add SLES 15 to all Molecule tests.
3030
* Create downgrade and upgrade tests for NGINX Plus.
3131
* Remove Yamllint (Ansible Lint now incorporates Yamllint).
32-
* Skip Ansible Lint line length rule.
32+
* Skip Ansible Lint line length and no templates in name rules. Slightly refactor code to incorporate changes added to Ansible Lint 6.7.0.
3333

3434
## 0.23.1 (April 6, 2022)
3535

molecule/downgrade_plus/prepare.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
hosts: localhost
44
gather_facts: false
55
tasks:
6-
- name: Create ephemeral license certificate file from b64 decoded env var
6+
- name: Create ephemeral license certificate file from b64 decoded env var # noqa template-instead-of-copy
77
ansible.builtin.copy:
88
content: "{{ lookup('env', 'NGINX_CRT') | b64decode }}"
99
dest: ../../files/license/nginx-repo.crt
1010
force: false
1111
mode: 0444
1212

13-
- name: Create ephemeral license key file from b64 decoded env var
13+
- name: Create ephemeral license key file from b64 decoded env var # noqa template-instead-of-copy
1414
ansible.builtin.copy:
1515
content: "{{ lookup('env', 'NGINX_KEY') | b64decode }}"
1616
dest: ../../files/license/nginx-repo.key

molecule/plus/prepare.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
hosts: localhost
44
gather_facts: false
55
tasks:
6-
- name: Create ephemeral license certificate file from b64 decoded env var
6+
- name: Create ephemeral license certificate file from b64 decoded env var # noqa template-instead-of-copy
77
ansible.builtin.copy:
88
content: "{{ lookup('env', 'NGINX_CRT') | b64decode }}"
99
dest: ../../files/license/nginx-repo.crt
1010
force: false
1111
mode: 0444
1212

13-
- name: Create ephemeral license key file from b64 decoded env var
13+
- name: Create ephemeral license key file from b64 decoded env var # noqa template-instead-of-copy
1414
ansible.builtin.copy:
1515
content: "{{ lookup('env', 'NGINX_KEY') | b64decode }}"
1616
dest: ../../files/license/nginx-repo.key

molecule/uninstall_plus/prepare.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
hosts: localhost
44
gather_facts: false
55
tasks:
6-
- name: Create ephemeral license certificate file from b64 decoded env var
6+
- name: Create ephemeral license certificate file from b64 decoded env var # noqa template-instead-of-copy
77
ansible.builtin.copy:
88
content: "{{ lookup('env', 'NGINX_CRT') | b64decode }}"
99
dest: ../../files/license/nginx-repo.crt
1010
force: false
1111
mode: 0444
1212

13-
- name: Create ephemeral license key file from b64 decoded env var
13+
- name: Create ephemeral license key file from b64 decoded env var # noqa template-instead-of-copy
1414
ansible.builtin.copy:
1515
content: "{{ lookup('env', 'NGINX_KEY') | b64decode }}"
1616
dest: ../../files/license/nginx-repo.key

molecule/upgrade_plus/prepare.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
hosts: localhost
44
gather_facts: false
55
tasks:
6-
- name: Create ephemeral license certificate file from b64 decoded env var
6+
- name: Create ephemeral license certificate file from b64 decoded env var # noqa template-instead-of-copy
77
ansible.builtin.copy:
88
content: "{{ lookup('env', 'NGINX_CRT') | b64decode }}"
99
dest: ../../files/license/nginx-repo.crt
1010
force: false
1111
mode: 0444
1212

13-
- name: Create ephemeral license key file from b64 decoded env var
13+
- name: Create ephemeral license key file from b64 decoded env var # noqa template-instead-of-copy
1414
ansible.builtin.copy:
1515
content: "{{ lookup('env', 'NGINX_KEY') | b64decode }}"
1616
dest: ../../files/license/nginx-repo.key

tasks/keys/setup-keys.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
- name: (Alpine Linux) Set up signing key
3+
when: ansible_facts['os_family'] == "Alpine"
34
block:
45
- name: (Alpine Linux) Set up NGINX signing key URL
56
ansible.builtin.set_fact:
@@ -10,7 +11,6 @@
1011
url: "{{ keysite }}"
1112
dest: /etc/apk/keys/nginx_signing.rsa.pub
1213
mode: 0400
13-
when: ansible_facts['os_family'] == "Alpine"
1414

1515
- name: (Debian/Red Hat/SLES OSs) Set up NGINX signing key URL
1616
ansible.builtin.set_fact:

tasks/main.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
tags: nginx_key
3232

3333
- name: "{{ nginx_setup | capitalize }} NGINX"
34+
when: nginx_enable | bool
35+
tags: nginx_enable
3436
block:
3537
- name: "{{ nginx_setup | capitalize }} NGINX Open Source"
3638
ansible.builtin.include_tasks: "{{ role_path }}/tasks/opensource/install-oss.yml"
@@ -69,8 +71,6 @@
6971
- ansible_facts['service_mgr'] == "systemd"
7072
- nginx_service_modify | bool
7173
tags: nginx_modify_systemd
72-
when: nginx_enable | bool
73-
tags: nginx_enable
7474

7575
- name: Trigger handlers if necessary
7676
ansible.builtin.meta: flush_handlers

tasks/modules/install-modules.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
- nginx_install_epel_release | bool
99

1010
- name: (RHEL) Install GeoIP2 and/or OpenTracing EPEL dependencies
11+
when:
12+
- ansible_facts['distribution'] == "RedHat"
13+
- (ansible_facts['distribution_major_version'] == 7 and '"geoip2" in nginx_modules')
14+
or '"opentracing" in nginx_modules'
15+
- nginx_install_epel_release | bool
1116
block:
1217
- name: (RHEL) Import EPEL GPG key
1318
ansible.builtin.rpm_key:
@@ -17,11 +22,6 @@
1722
- name: (RHEL) Install package dependencies
1823
ansible.builtin.yum:
1924
name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_facts['distribution_major_version'] }}.noarch.rpm
20-
when:
21-
- ansible_facts['distribution'] == "RedHat"
22-
- (ansible_facts['distribution_major_version'] == 7 and '"geoip2" in nginx_modules')
23-
or '"opentracing" in nginx_modules'
24-
- nginx_install_epel_release | bool
2525

2626
- name: Setup NGINX modules
2727
ansible.builtin.package:

tasks/opensource/install-alpine.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
notify: (Handler) Run NGINX
1818

1919
- name: (Alpine Linux) Upgrade NGINX workaround ('nginx_setup' is set to 'upgrade' and 'nginx_version' is not defined)
20+
when:
21+
- nginx_setup == 'upgrade'
22+
- nginx_version is not defined
2023
block:
2124
- name: (Alpine Linux) Check if there are NGINX upgrades available
2225
ansible.builtin.command: apk list --upgrade
@@ -28,6 +31,3 @@
2831
changed_when: upgrade.stdout is search('nginx')
2932
when: upgrade.stdout is search('nginx')
3033
notify: (Handler) Run NGINX
31-
when:
32-
- nginx_setup == 'upgrade'
33-
- nginx_version is not defined

tasks/opensource/install-bsd.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
- name: (FreeBSD) Update ports
3+
when:
4+
- ansible_facts['system'] == "FreeBSD"
5+
- nginx_bsd_update_ports | bool
36
block:
47
- name: (FreeBSD) Fetch ports
58
ansible.builtin.command: portsnap fetch --interactive
@@ -10,11 +13,9 @@
1013
ansible.builtin.command: portsnap extract
1114
args:
1215
creates: /usr/ports
13-
when:
14-
- ansible_facts['system'] == "FreeBSD"
15-
- nginx_bsd_update_ports | bool
1616

1717
- name: (FreeBSD) {{ nginx_setup | capitalize }} NGINX
18+
when: ansible_facts['system'] == "FreeBSD"
1819
block:
1920
- name: (FreeBSD) {{ nginx_setup | capitalize }} NGINX package
2021
community.general.pkgng:
@@ -30,9 +31,9 @@
3031
state: "{{ nginx_state }}"
3132
when: not nginx_bsd_install_packages | bool
3233
notify: (Handler) Run NGINX
33-
when: ansible_facts['system'] == "FreeBSD"
3434

3535
- name: (OpenBSD) {{ nginx_setup | capitalize }} NGINX
36+
when: ansible_facts['system'] == "OpenBSD"
3637
block:
3738
- name: (OpenBSD) {{ nginx_setup | capitalize }} NGINX package
3839
community.general.openbsd_pkg:
@@ -49,9 +50,9 @@
4950
state: "{{ nginx_state }}"
5051
when: not nginx_bsd_install_packages | bool
5152
notify: (Handler) Run NGINX
52-
when: ansible_facts['system'] == "OpenBSD"
5353

5454
- name: (NetBSD) {{ nginx_setup | capitalize }} NGINX
55+
when: ansible_facts['system'] == "NetBSD"
5556
block:
5657
- name: (NetBSD) {{ nginx_setup | capitalize }} NGINX package
5758
ansible.builtin.command: pkg_add www/nginx{{ nginx_version | default('') }}
@@ -62,9 +63,9 @@
6263
ansible.builtin.fail:
6364
msg: "{{ ansible_facts['system'] }} {{ nginx_setup | capitalize }} NGINX port not implemented."
6465
when: not nginx_bsd_install_packages | bool
65-
when: ansible_facts['system'] == "NetBSD"
6666

6767
- name: (DragonFlyBSD/HardenedBSD) {{ nginx_setup | capitalize }} NGINX
68+
when: ansible_facts['system'] in ['DragonFlyBSD', 'HardenedBSD']
6869
block:
6970
- name: (DragonFlyBSD/HardenedBSD) {{ nginx_setup | capitalize }} NGINX package
7071
ansible.builtin.command: pkg install www/nginx{{ nginx_version | default('') }}
@@ -75,4 +76,3 @@
7576
ansible.builtin.fail:
7677
msg: "{{ ansible_facts['system'] }} {{ nginx_setup | capitalize }} NGINX port not implemented."
7778
when: not nginx_bsd_install_packages | bool
78-
when: ansible_facts['system'] in ['DragonFlyBSD', 'HardenedBSD']

tasks/opensource/install-oss.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
- name: "{{ nginx_setup | capitalize }} NGINX in Linux systems"
3+
when: ansible_facts['system'] | lower is not search('bsd')
34
block:
45
- name: "{{ nginx_setup | capitalize }} NGINX from repository"
56
ansible.builtin.include_tasks: "{{ role_path }}/tasks/opensource/install-{{ ansible_facts['os_family'] | lower }}.yml"
@@ -15,7 +16,6 @@
1516
state: "{{ nginx_state }}"
1617
when: nginx_install_from == "os_repository"
1718
notify: (Handler) Run NGINX
18-
when: ansible_facts['system'] | lower is not search('bsd')
1919

2020
- name: "{{ nginx_setup | capitalize }} NGINX in Unix systems"
2121
ansible.builtin.include_tasks: "{{ role_path }}/tasks/opensource/install-bsd.yml"

0 commit comments

Comments
 (0)