Skip to content

Bump ansible-lint from 6.11.0 to 6.13.1 in /.github/workflows/requirements #589

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.14.2
jinja2==3.1.2
ansible-lint==6.11.0
ansible-lint==6.13.1
yamllint==1.29.0
molecule[docker]==4.0.4
docker==6.0.1
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 0.24.1 (Unreleased)

ENHANCEMENTS:

Refactor the OSS BSD installation process to consolidate tasks and avoid Ansible Lint warnings.

## 0.24.0 (January 29, 2023)

BREAKING CHANGES:
Expand Down
4 changes: 2 additions & 2 deletions molecule/downgrade-plus/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
content: "{{ lookup('env', 'NGINX_CRT') | b64decode }}"
dest: ../../files/license/nginx-repo.crt
force: false
mode: 0444
mode: "0444"

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

- name: Prepare NGINX Plus
hosts: all
Expand Down
4 changes: 2 additions & 2 deletions molecule/plus/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
content: "{{ lookup('env', 'NGINX_CRT') | b64decode }}"
dest: ../../files/license/nginx-repo.crt
force: false
mode: 0444
mode: "0444"

- name: Create ephemeral license key file from b64 decoded env var # noqa template-instead-of-copy
ansible.builtin.copy:
content: "{{ lookup('env', 'NGINX_KEY') | b64decode }}"
dest: ../../files/license/nginx-repo.key
force: false
mode: 0444
mode: "0444"
4 changes: 2 additions & 2 deletions molecule/uninstall-plus/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
content: "{{ lookup('env', 'NGINX_CRT') | b64decode }}"
dest: ../../files/license/nginx-repo.crt
force: false
mode: 0444
mode: "0444"

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

- name: Prepare NGINX Plus
hosts: all
Expand Down
4 changes: 2 additions & 2 deletions molecule/upgrade-plus/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
content: "{{ lookup('env', 'NGINX_CRT') | b64decode }}"
dest: ../../files/license/nginx-repo.crt
force: false
mode: 0444
mode: "0444"

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

- name: Prepare NGINX Plus
hosts: all
Expand Down
2 changes: 1 addition & 1 deletion tasks/amplify/install-amplify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
remote_src: true
src: /etc/amplify-agent/agent.conf.default
dest: /etc/amplify-agent/agent.conf
mode: 0644
mode: "0644"

- name: Configure NGINX Amplify agent API key
ansible.builtin.lineinfile:
Expand Down
2 changes: 1 addition & 1 deletion tasks/amplify/setup-debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
filename: nginx-amplify
repo: deb [arch=amd64 signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://packages.amplify.nginx.com/py3/{{ ansible_facts['distribution'] | lower }}/{{ ansible_facts['distribution_release'] | lower }} amplify-agent
update_cache: true
mode: 0644
mode: "0644"
2 changes: 1 addition & 1 deletion tasks/amplify/setup-redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
description: NGINX Amplify Agent
enabled: true
gpgcheck: true
mode: 0644
mode: "0644"
6 changes: 3 additions & 3 deletions tasks/config/modify-systemd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
ansible.builtin.file:
path: "{{ nginx_service_overridepath }}"
state: directory
mode: 0755
mode: "0755"

- name: Create override for NGINX systemd service
ansible.builtin.template:
src: "{{ role_path }}/templates/services/nginx.service.override.conf.j2"
dest: "{{ nginx_service_overridepath }}/{{ nginx_service_overridefilename }}"
owner: root
group: root
mode: 0644
mode: "0644"
when:
- not nginx_service_custom | bool
- not nginx_service_clean | bool
Expand All @@ -23,7 +23,7 @@
dest: "{{ nginx_service_overridepath }}/{{ nginx_service_overridefilename }}"
owner: root
group: root
mode: 0644
mode: "0644"
when:
- nginx_service_custom | bool
- not nginx_service_clean | bool
Expand Down
2 changes: 1 addition & 1 deletion tasks/config/setup-logrotate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@
ansible.builtin.template:
src: logrotate/nginx.j2
dest: /etc/logrotate.d/nginx
mode: 0644
mode: "0644"
notify: (Handler) Run logrotate
2 changes: 1 addition & 1 deletion tasks/keys/setup-keys.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
ansible.builtin.get_url:
url: "{{ keysite }}"
dest: /etc/apk/keys/nginx_signing.rsa.pub
mode: 0400
mode: "0400"

- name: (Debian/Red Hat/SLES OSs) Set up NGINX signing key URL
ansible.builtin.set_fact:
Expand Down
41 changes: 18 additions & 23 deletions tasks/opensource/install-bsd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,31 @@
cmd: portsnap extract
creates: /usr/ports

- name: (FreeBSD) {{ nginx_setup | capitalize }} NGINX
when: ansible_facts['system'] == 'FreeBSD'
- name: (DragonFlyBSD/FreeBSD/HardenedBSD) {{ nginx_setup | capitalize }} NGINX
when: ansible_facts['system'] in ['DragonFlyBSD', 'FreeBSD' 'HardenedBSD']
block:
- name: (FreeBSD) {{ nginx_setup | capitalize }} NGINX package
- name: (DragonFlyBSD/FreeBSD/HardenedBSD) {{ nginx_setup | capitalize }} NGINX package
community.general.pkgng:
name: www/nginx{{ nginx_version | default('') }}
state: "{{ nginx_state }}"
when: nginx_bsd_install_packages | bool
notify: (Handler) Run NGINX

- name: (FreeBSD) {{ nginx_setup | capitalize }} NGINX port
community.general.portinstall:
name: www/nginx{{ nginx_version | default('') }}
use_packages: "{{ nginx_bsd_portinstall_use_packages | default(omit) }}"
state: "{{ nginx_state }}"
- name: (DragonFlyBSD/FreeBSD/HardenedBSD) {{ nginx_setup | capitalize }} NGINX port
when: not nginx_bsd_install_packages | bool
notify: (Handler) Run NGINX
block:
- name: (FreeBSD) {{ nginx_setup | capitalize }} NGINX port
community.general.portinstall:
name: www/nginx{{ nginx_version | default('') }}
use_packages: "{{ nginx_bsd_portinstall_use_packages | default(omit) }}"
state: "{{ nginx_state }}"
when: ansible_facts['system'] == 'FreeBSD'
notify: (Handler) Run NGINX

- name: (DragonFlyBSD/HardenedBSD) {{ nginx_setup | capitalize }} NGINX port
ansible.builtin.fail:
msg: "{{ ansible_facts['system'] }} {{ nginx_setup | capitalize }} NGINX port not implemented."
when: ansible_facts['system'] in ['DragonFlyBSD', 'HardenedBSD']

- name: (OpenBSD) {{ nginx_setup | capitalize }} NGINX
when: ansible_facts['system'] == 'OpenBSD'
Expand All @@ -55,24 +63,11 @@
when: ansible_facts['system'] == 'NetBSD'
block:
- name: (NetBSD) {{ nginx_setup | capitalize }} NGINX package
ansible.builtin.command: pkg_add www/nginx{{ nginx_version | default('') }}
community.general.pkgin: nginx{{ nginx_version | default('') }}
when: nginx_bsd_install_packages | bool
notify: (Handler) Run NGINX

- name: (NetBSD) {{ nginx_setup | capitalize }} NGINX port
ansible.builtin.fail:
msg: "{{ ansible_facts['system'] }} {{ nginx_setup | capitalize }} NGINX port not implemented."
when: not nginx_bsd_install_packages | bool

- name: (DragonFlyBSD/HardenedBSD) {{ nginx_setup | capitalize }} NGINX
when: ansible_facts['system'] in ['DragonFlyBSD', 'HardenedBSD']
block:
- name: (DragonFlyBSD/HardenedBSD) {{ nginx_setup | capitalize }} NGINX package
ansible.builtin.command: pkg install www/nginx{{ nginx_version | default('') }}
when: nginx_bsd_install_packages | bool
notify: (Handler) Run NGINX

- name: (DragonFlyBSD/HardenedBSD) {{ nginx_setup | capitalize }} NGINX port
ansible.builtin.fail:
msg: "{{ ansible_facts['system'] }} {{ nginx_setup | capitalize }} NGINX port not implemented."
when: not nginx_bsd_install_packages | bool
4 changes: 2 additions & 2 deletions tasks/opensource/install-debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
filename: nginx
repo: "{{ item }}"
update_cache: true
mode: 0644
mode: "0644"
state: "{{ (nginx_state == 'uninstall') | ternary('absent', 'present') }}"
loop: "{{ nginx_repository | default(nginx_default_repository_debian) }}"
when: nginx_manage_repo | bool
Expand All @@ -18,7 +18,7 @@
Pin: origin nginx.org
Pin: release o=nginx
Pin-Priority: 900
mode: 0644
mode: "0644"
state: "{{ (nginx_state == 'uninstall') | ternary('absent', 'present') }}"
when: nginx_repository is not defined

Expand Down
2 changes: 1 addition & 1 deletion tasks/opensource/install-redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
description: NGINX Repository
enabled: true
gpgcheck: true
mode: 0644
mode: "0644"
module_hotfixes: true
state: "{{ (nginx_state == 'uninstall') | ternary('absent', 'present') }}"
when: nginx_manage_repo | bool
Expand Down
34 changes: 17 additions & 17 deletions tasks/opensource/install-source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,21 +144,21 @@
ansible.builtin.get_url:
url: "{{ (pcre_release == 2) | ternary('https://github.com/PCRE2Project/pcre2/releases/download/pcre2-' ~ pcre_version ~ '/pcre2-' ~ pcre_version ~ '.tar.gz', 'https://ftp.exim.org/pub/pcre/pcre-' ~ pcre_version ~ '.tar.gz') }}"
dest: /tmp
mode: 0600
mode: "0600"
register: pcre_source

- name: Ensure PCRE directory exists
ansible.builtin.file:
path: /tmp/pcre-{{ pcre_version }}
state: directory
mode: 0700
mode: "0700"

- name: Unpack PCRE dependency
ansible.builtin.unarchive:
copy: false
src: "{{ pcre_source['dest'] }}"
dest: /tmp/pcre-{{ pcre_version }}/
mode: 0700
mode: "0700"
extra_opts: [--strip-components=1]

- name: Configure PCRE dependency
Expand Down Expand Up @@ -213,21 +213,21 @@
ansible.builtin.get_url:
url: https://github.com/madler/zlib/releases/download/v{{ zlib_version }}/zlib-{{ zlib_version }}.tar.gz
dest: /tmp
mode: 0600
mode: "0600"
register: zlib_source

- name: Ensure ZLib directory exists
ansible.builtin.file:
path: /tmp/zlib-{{ zlib_version }}
state: directory
mode: 0700
mode: "0700"

- name: Unpack ZLib dependency
ansible.builtin.unarchive:
copy: false
src: "{{ zlib_source['dest'] }}"
dest: /tmp/zlib-{{ zlib_version }}
mode: 0700
mode: "0700"
extra_opts: [--strip-components=1]

- name: Configure ZLib dependency
Expand Down Expand Up @@ -282,21 +282,21 @@
ansible.builtin.get_url:
url: https://github.com/openssl/openssl/archive/refs/tags/openssl-{{ openssl_version }}.tar.gz
dest: /tmp/{{ openssl_version }}.tar.gz
mode: 0600
mode: "0600"
register: openssl_source

- name: Ensure OpenSSL directory exists
ansible.builtin.file:
path: /tmp/openssl-{{ openssl_version }}
state: directory
mode: 0700
mode: "0700"

- name: Unpack OpenSSL dependency
ansible.builtin.unarchive:
copy: false
src: "{{ openssl_source['dest'] }}"
dest: /tmp/openssl-{{ openssl_version }}
mode: 0700
mode: "0700"
extra_opts: [--strip-components=1]

- name: Configure OpenSSL dependency
Expand Down Expand Up @@ -354,15 +354,15 @@
ansible.builtin.get_url:
url: https://nginx.org/download/{{ nginx_version }}.tar.gz
dest: /tmp/{{ nginx_version }}.tar.gz
mode: 0600
mode: "0600"
register: nginx_source

- name: Unpack NGINX
ansible.builtin.unarchive:
copy: false
src: "{{ nginx_source.dest }}"
dest: /tmp
mode: 0755
mode: "0755"

- name: Set static modules
ansible.builtin.set_fact:
Expand Down Expand Up @@ -410,7 +410,7 @@
dest: "{{ (ansible_facts['os_family'] == 'Suse') | ternary('usr/lib/systemd/system/nginx.service', '/lib/systemd/system/nginx.service') }}"
owner: root
group: root
mode: 0644
mode: "0644"

- name: Enable systemd NGINX service file
ansible.builtin.systemd:
Expand All @@ -429,15 +429,15 @@
dest: /etc/init.d/nginx
owner: root
group: root
mode: 0755
mode: "0755"

- name: Upload Upstart NGINX service conf file
ansible.builtin.copy:
src: services/nginx.conf.upstart
dest: /etc/init/nginx.conf
owner: root
group: root
mode: 0644
mode: "0644"

- name: Enable Upstart NGINX service reload # noqa no-changed-when
ansible.builtin.command: initctl reload-configuration
Expand All @@ -451,7 +451,7 @@
dest: /etc/init.d/nginx
owner: root
group: root
mode: 0755
mode: "0755"
when: ansible_facts['service_mgr'] == 'sysvinit'
notify: (Handler) Run NGINX

Expand All @@ -465,15 +465,15 @@
dest: /run/openrc/softlevel
force: false
owner: root
mode: 0644
mode: "0644"

- name: Upload OpenRC NGINX service file
ansible.builtin.copy:
src: services/nginx.openrc
dest: /etc/init.d/nginx
owner: root
group: root
mode: 0755
mode: "0755"

- name: Enable OpenRC NGINX service # noqa no-changed-when
ansible.builtin.command: rc-update add nginx default
Expand Down
Loading