Skip to content

Bump ansible-lint from 5.4.0 to 6.0.1 in /.github/workflows/requirements #499

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/requirements/requirements_molecule.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ansible-core==2.12.3
jinja2==3.0.3
ansible-lint==5.4.0
ansible-lint==6.0.1
yamllint==1.26.3
molecule[docker]==3.6.1
docker==5.0.3
12 changes: 6 additions & 6 deletions handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
- name: (Handler) Systemd daemon-reload
systemd:
ansible.builtin.systemd:
daemon_reload: true

- name: (Handler) Start/reload NGINX
service:
ansible.builtin.service:
name: nginx
state: reloaded
enabled: true
Expand All @@ -15,7 +15,7 @@
listen: (Handler) Run NGINX

- name: (Handler) Check NGINX
command: nginx -t
ansible.builtin.command: nginx -t
args:
chdir: "{{ ((ansible_facts['system'] | lower is not search('bsd')) | ternary('/etc/nginx', '/usr/local/sbin')) }}"
register: config_check
Expand All @@ -26,7 +26,7 @@
listen: (Handler) Run NGINX

- name: (Handler) Print NGINX error if syntax check fails
debug:
ansible.builtin.debug:
var: config_check.stderr_lines
failed_when: config_check.rc != 0
when:
Expand All @@ -37,9 +37,9 @@
listen: (Handler) Run NGINX

- name: (Handler) Start NGINX Amplify agent
service:
ansible.builtin.service:
name: amplify-agent
state: started

- name: (Handler) Run logrotate
command: logrotate -f /etc/logrotate.d/nginx
ansible.builtin.command: logrotate -f /etc/logrotate.d/nginx
8 changes: 4 additions & 4 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
hosts: all
pre_tasks:
- name: Set repo if Alpine
set_fact:
ansible.builtin.set_fact:
version: "=1.21.5-r1"
when: ansible_facts['os_family'] == "Alpine"
- name: Set repo if Debian
set_fact:
ansible.builtin.set_fact:
version: "=1.21.5-1~{{ ansible_facts['distribution_release'] }}"
when: ansible_facts['os_family'] == "Debian"
- name: Set repo if Red Hat
set_fact:
ansible.builtin.set_fact:
version: "-1.21.5-1.{{ (ansible_facts['distribution'] == 'Amazon') | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx"
when: ansible_facts['os_family'] == "RedHat"
tasks:
- name: Install NGINX
include_role:
ansible.builtin.include_role:
name: ansible-role-nginx
vars:
nginx_version: "{{ version }}"
Expand Down
8 changes: 4 additions & 4 deletions molecule/default/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
hosts: all
tasks:
- name: Check if NGINX is installed
package:
ansible.builtin.package:
name: nginx
state: present
check_mode: true
register: install
failed_when: (install is changed) or (install is failed)

- name: Check if NGINX service is running
service:
ansible.builtin.service:
name: nginx
state: started
enabled: true
Expand All @@ -20,12 +20,12 @@
failed_when: (service is changed) or (service is failed)

- name: Verify NGINX is up and running
uri:
ansible.builtin.uri:
url: http://localhost
status_code: 200

- name: Verify correct version of NGINX has been installed
command: nginx -v
ansible.builtin.command: nginx -v
args:
chdir: "{{ ((ansible_facts['system'] | lower is not search('bsd')) | ternary('/etc/nginx', '/usr/local/sbin')) }}"
changed_when: false
Expand Down
8 changes: 4 additions & 4 deletions molecule/downgrade/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
hosts: all
pre_tasks:
- name: Set repo if Alpine
set_fact:
ansible.builtin.set_fact:
version: "=1.20.2-r1"
when: ansible_facts['os_family'] == "Alpine"
- name: Set repo if Debian
set_fact:
ansible.builtin.set_fact:
version: "=1.20.2-1~{{ ansible_facts['distribution_release'] }}"
when: ansible_facts['os_family'] == "Debian"
- name: Set repo if Red Hat
set_fact:
ansible.builtin.set_fact:
version: "-1.20.2-1.{{ (ansible_facts['distribution'] == 'Amazon') | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx"
when: ansible_facts['os_family'] == "RedHat"
tasks:
- name: Install NGINX
include_role:
ansible.builtin.include_role:
name: ansible-role-nginx
vars:
nginx_version: "{{ version }}"
Expand Down
8 changes: 4 additions & 4 deletions molecule/downgrade/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
hosts: all
pre_tasks:
- name: Set repo if Alpine
set_fact:
ansible.builtin.set_fact:
version: "=1.21.5-r1"
when: ansible_facts['os_family'] == "Alpine"
- name: Set repo if Debian
set_fact:
ansible.builtin.set_fact:
version: "=1.21.5-1~{{ ansible_facts['distribution_release'] }}"
when: ansible_facts['os_family'] == "Debian"
- name: Set repo if Red Hat
set_fact:
ansible.builtin.set_fact:
version: "-1.21.5-1.{{ (ansible_facts['distribution'] == 'Amazon') | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx"
when: ansible_facts['os_family'] == "RedHat"
tasks:
- name: Install NGINX
include_role:
ansible.builtin.include_role:
name: ansible-role-nginx
vars:
nginx_version: "{{ version }}"
20 changes: 10 additions & 10 deletions molecule/downgrade/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
hosts: all
tasks:
- name: Check if NGINX is installed
package:
ansible.builtin.package:
name: nginx
state: present
check_mode: true
register: install
failed_when: (install is changed) or (install is failed)

- name: Check if NGINX service is running
service:
ansible.builtin.service:
name: nginx
state: started
enabled: true
Expand All @@ -20,14 +20,14 @@
failed_when: (service is changed) or (service is failed)

- name: Verify NGINX is up and running
uri:
ansible.builtin.uri:
url: http://localhost
status_code: 200

# - name: Verify NGINX has been downgraded
# command: nginx -v
# args:
# chdir: "{{ ((ansible_facts['system'] | lower is not search('bsd')) | ternary('/etc/nginx', '/usr/local/sbin')) }}"
# changed_when: false
# register: version
# failed_when: version is not search('1.21.3')
- name: Verify NGINX has been downgraded
ansible.builtin.command: nginx -v
args:
chdir: "{{ ((ansible_facts['system'] | lower is not search('bsd')) | ternary('/etc/nginx', '/usr/local/sbin')) }}"
changed_when: false
register: version
failed_when: version is not search('1.20.2')
2 changes: 1 addition & 1 deletion molecule/module/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
hosts: all
tasks:
- name: Install NGINX modules
include_role:
ansible.builtin.include_role:
name: ansible-role-nginx
vars:
nginx_modules:
Expand Down
6 changes: 3 additions & 3 deletions molecule/module/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
hosts: all
tasks:
- name: Check if NGINX is installed
package:
ansible.builtin.package:
name: nginx
state: present
check_mode: true
register: install
failed_when: (install is changed) or (install is failed)

- name: Check if NGINX service is running
service:
ansible.builtin.service:
name: nginx
state: started
enabled: true
Expand All @@ -20,6 +20,6 @@
failed_when: (service is changed) or (service is failed)

- name: Verify NGINX is up and running
uri:
ansible.builtin.uri:
url: http://localhost
status_code: 200
2 changes: 1 addition & 1 deletion molecule/plus/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
hosts: all
tasks:
- name: Install NGINX Plus
include_role:
ansible.builtin.include_role:
name: ansible-role-nginx
vars:
nginx_type: plus
Expand Down
4 changes: 2 additions & 2 deletions molecule/plus/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
gather_facts: false
tasks:
- name: Create ephemeral license certificate file from b64 decoded env var
copy:
ansible.builtin.copy:
content: "{{ lookup('env','NGINX_CRT') | b64decode }}"
dest: ../../files/license/nginx-repo.crt
force: false
mode: 0444

- name: Create ephemeral license key file from b64 decoded env var
copy:
ansible.builtin.copy:
content: "{{ lookup('env','NGINX_KEY') | b64decode }}"
dest: ../../files/license/nginx-repo.key
force: false
Expand Down
6 changes: 3 additions & 3 deletions molecule/plus/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
hosts: all
tasks:
- name: Check if NGINX Plus is installed
package:
ansible.builtin.package:
name: nginx-plus
state: present
check_mode: true
register: install
failed_when: (install is changed) or (install is failed)

- name: Check if NGINX Plus service is running
service:
ansible.builtin.service:
name: nginx
state: started
enabled: true
Expand All @@ -20,6 +20,6 @@
failed_when: (service is changed) or (service is failed)

- name: Verify NGINX Plus is up and running
uri:
ansible.builtin.uri:
url: http://localhost
status_code: 200
2 changes: 1 addition & 1 deletion molecule/source/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
hosts: all
tasks:
- name: Install NGINX from source
include_role:
ansible.builtin.include_role:
name: ansible-role-nginx
vars:
nginx_install_from: source
Expand Down
4 changes: 2 additions & 2 deletions molecule/source/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
hosts: all
tasks:
- name: Check if NGINX service is running
service:
ansible.builtin.service:
name: nginx
state: started
enabled: true
Expand All @@ -12,6 +12,6 @@
failed_when: (service is changed) or (service is failed)

- name: Verify NGINX is up and running
uri:
ansible.builtin.uri:
url: http://localhost
status_code: 200
2 changes: 1 addition & 1 deletion molecule/uninstall/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
hosts: all
tasks:
- name: Uninstall NGINX
include_role:
ansible.builtin.include_role:
name: ansible-role-nginx
vars:
nginx_setup: uninstall
2 changes: 1 addition & 1 deletion molecule/uninstall/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
hosts: all
tasks:
- name: Install NGINX
include_role:
ansible.builtin.include_role:
name: ansible-role-nginx
2 changes: 1 addition & 1 deletion molecule/uninstall/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
hosts: all
tasks:
- name: Check if NGINX is installed
package:
ansible.builtin.package:
name: nginx
state: absent
check_mode: true
Expand Down
2 changes: 1 addition & 1 deletion molecule/uninstall_plus/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
hosts: all
tasks:
- name: Uninstall NGINX
include_role:
ansible.builtin.include_role:
name: ansible-role-nginx
vars:
nginx_type: plus
Expand Down
6 changes: 3 additions & 3 deletions molecule/uninstall_plus/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
gather_facts: false
tasks:
- name: Create ephemeral license certificate file from b64 decoded env var
copy:
ansible.builtin.copy:
content: "{{ lookup('env','NGINX_CRT') | b64decode }}"
dest: ../../files/license/nginx-repo.crt
force: false
mode: 0444

- name: Create ephemeral license key file from b64 decoded env var
copy:
ansible.builtin.copy:
content: "{{ lookup('env','NGINX_KEY') | b64decode }}"
dest: ../../files/license/nginx-repo.key
force: false
Expand All @@ -21,7 +21,7 @@
hosts: all
tasks:
- name: Install NGINX
include_role:
ansible.builtin.include_role:
name: ansible-role-nginx
vars:
nginx_type: plus
Expand Down
2 changes: 1 addition & 1 deletion molecule/uninstall_plus/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
hosts: all
tasks:
- name: Check if NGINX is installed
package:
ansible.builtin.package:
name: nginx-plus
state: absent
check_mode: true
Expand Down
2 changes: 1 addition & 1 deletion molecule/upgrade/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
hosts: all
tasks:
- name: Install NGINX
include_role:
ansible.builtin.include_role:
name: ansible-role-nginx
vars:
nginx_setup: upgrade
Loading