diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 998aebc3..77a8893c 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,6 +1,5 @@ # Main global owner # ##################### - * @alessfg @aknot242 /.github/workflows/ *.md diff --git a/.github/workflows/galaxy.yml b/.github/workflows/galaxy.yml index 7aff4992..b4a56b20 100644 --- a/.github/workflows/galaxy.yml +++ b/.github/workflows/galaxy.yml @@ -1,6 +1,6 @@ --- name: Ansible Galaxy import -"on": +on: release: types: - published diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index 79347e13..23aa8576 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -1,14 +1,14 @@ --- name: Molecule CI/CD -"on": +on: pull_request: branches: - main push: branches: - main - ignore-tags: - - "*" + tags-ignore: + - "**" schedule: - cron: "0 0 1 * *" workflow_dispatch: diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 3fbc09fe..ef4a7d0e 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -1,6 +1,6 @@ --- name: Release Drafter -"on": +on: pull_request: types: - opened diff --git a/CHANGELOG.md b/CHANGELOG.md index ccfa8d92..8aedc904 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## 0.8.2 (Unreleased) +## 0.9.0 (Unreleased) FEATURES: @@ -14,11 +14,14 @@ FEATURES: ENHANCEMENTS: -Bump the Ansible `community.general` collection to `6.2.0`, `community.crypto` collection to `2.10.0` and `community.docker` collection to `3.4.0`. +* Standardize code from dot to array notation to keep in with the standards set by the other roles in the Ansible NGINX core collection. +* Bump the minimum version of Ansible core required to run the role to `2.12` (`2.11` is no longer supported by Ansible). +* Bump the Ansible `community.general` collection to `6.2.0`, `community.crypto` collection to `2.10.0` and `community.docker` collection to `3.4.0`. BUG FIXES: -The Alpine Linux `libelf` dependency is no longer automatically installed by NGINX App Protect DoS so we need to explicitly install it as a prerequisite. +* The Alpine Linux `libelf` dependency is no longer automatically installed by NGINX App Protect DoS so we need to explicitly install it as a prerequisite. +* The `ignore-tags` GitHub actions key does not exist. Replace it with the correct key, `tags-ignore`. TESTS: diff --git a/README.md b/README.md index e76ee0d7..984253b7 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ If you wish to install NGINX App Protect WAF or NGINX App Protect DoS using this ### Ansible -* This role is developed and tested with [maintained](https://docs.ansible.com/ansible/devel/reference_appendices/release_and_maintenance.html) versions of Ansible core (above `2.11`). +* This role is developed and tested with [maintained](https://docs.ansible.com/ansible/devel/reference_appendices/release_and_maintenance.html) versions of Ansible core (above `2.12`). * When using Ansible core, you will also need to install the following collections: ```yaml @@ -50,13 +50,13 @@ If you wish to install NGINX App Protect WAF or NGINX App Protect DoS using this * Instructions on how to install Molecule can be found in the [Molecule website](https://molecule.readthedocs.io/en/latest/installation.html). *You will also need to install the Molecule Docker driver.* * To run the Molecule tests, you must copy your NGINX App Protect license to the role's [`files/license`](https://github.com/nginxinc/ansible-role-nginx-app-protect/blob/main/files/license/) folder. -You can alternatively add your NGINX App Protect repository certificate and key to the local environment. Run the following commands to export these files as base64-encoded variables and execute the Molecule tests: + You can alternatively add your NGINX App Protect repository certificate and key to the local environment. Run the following commands to export these files as base64-encoded variables and execute the Molecule tests: -```bash -export NGINX_CRT=$( cat | base64 ) -export NGINX_KEY=$( cat | base64 ) -molecule test -``` + ```bash + export NGINX_CRT=$( cat | base64 ) + export NGINX_KEY=$( cat | base64 ) + molecule test + ``` ## Installation diff --git a/handlers/main.yml b/handlers/main.yml index 1718c4a6..c191f5bd 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -22,10 +22,10 @@ - name: (Handler - NGINX App Protect) Print NGINX error if syntax check fails ansible.builtin.debug: - var: config_check.stderr_lines - failed_when: config_check.rc != 0 + var: config_check['stderr_lines'] + failed_when: config_check['rc'] != 0 when: - - config_check.stderr_lines is defined - - config_check.stderr_lines != [] - - config_check.rc != 0 + - config_check['stderr_lines'] is defined + - config_check['stderr_lines'] != [] + - config_check['rc'] != 0 listen: (Handler - NGINX App Protect) Run NGINX diff --git a/meta/main.yml b/meta/main.yml index cc0e2135..5911eb49 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -1,32 +1,25 @@ --- galaxy_info: author: nginxinc - description: Official Ansible role for NGINX App Protect WAF and DoS + description: Official Ansible role for installing and configuring NGINX App Protect WAF and DoS role_name: nginx_app_protect company: F5, Inc. license: Apache License, Version 2.0 - min_ansible_version: "2.11" + min_ansible_version: '2.12' platforms: - name: Alpine - versions: - - all + versions: [all] - name: Amazon Linux 2 - versions: - - all + versions: [all] - name: EL - versions: - - "7" - - "8" + versions: ['7', '8'] - name: Debian - versions: - - bullseye + versions: [bullseye] - name: Ubuntu - versions: - - bionic - - focal + versions: [bionic, focal] galaxy_tags: - waf