From f6a0f7574d3d75d712557d3d822474aeeae11791 Mon Sep 17 00:00:00 2001 From: Ruben Ruiz de Gauna Date: Tue, 12 Dec 2023 10:42:31 +0100 Subject: [PATCH 1/4] chore: bump GH action dependencies --- .ansible-lint | 9 +++++++++ .github/actions/installation/install.sh | 4 ++-- .github/actions/linter/action.yml | 2 +- .github/workflows/main.yml | 6 +++--- 4 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 .ansible-lint diff --git a/.ansible-lint b/.ansible-lint new file mode 100644 index 0000000..4a0abea --- /dev/null +++ b/.ansible-lint @@ -0,0 +1,9 @@ +enable_list: + - yaml + +skip_list: + - role-name + - risky-file-permissions + - literal-compare + - fqcn + - name[casing] diff --git a/.github/actions/installation/install.sh b/.github/actions/installation/install.sh index 5f356bf..ddb0192 100755 --- a/.github/actions/installation/install.sh +++ b/.github/actions/installation/install.sh @@ -1,7 +1,7 @@ sudo pipx uninstall ansible-core sudo pip3 install 'rich>=10.0.0,<11.0.0' -sudo pip3 install ansible-lint[community]==5.3.2 -sudo pip3 install molecule[docker]==3.6.0 +sudo pip3 install ansible-lint[community]==6.13.1 +sudo pip3 install molecule[docker]==4.0.4 ansible --version diff --git a/.github/actions/linter/action.yml b/.github/actions/linter/action.yml index 211db62..29a9ac1 100644 --- a/.github/actions/linter/action.yml +++ b/.github/actions/linter/action.yml @@ -5,5 +5,5 @@ runs: steps: - name: Run linter id: linter - run: ansible-lint tasks/* -x role-name,risky-file-permissions,literal-compare -c .yamllint + run: ansible-lint tasks/* shell: bash diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8b94bcb..f97ce0e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,8 +14,8 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install requirements - uses: newrelic/infrastructure-agent-ansible/.github/actions/installation@master + uses: ./.github/actions/installation - name: Run linter - uses: newrelic/infrastructure-agent-ansible/.github/actions/linter@master + uses: ./.github/actions/linter - name: Run tests - uses: newrelic/infrastructure-agent-ansible/.github/actions/tests@master + uses: ./.github/actions/tests From 7aa3a79ef0784ee2765db339227ed579316d4512 Mon Sep 17 00:00:00 2001 From: Ruben Ruiz de Gauna Date: Tue, 12 Dec 2023 12:00:55 +0100 Subject: [PATCH 2/4] linter: jinja spacing --- tasks/setup_agent_service.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/setup_agent_service.yml b/tasks/setup_agent_service.yml index 7cf0673..9a46c13 100644 --- a/tasks/setup_agent_service.yml +++ b/tasks/setup_agent_service.yml @@ -12,7 +12,7 @@ win_service: name: newrelic-infra state: "{{ nrinfragent_service_state }}" - start_mode: "{{ nrinfragent_service_enabled | ternary('auto','manual') }}" + start_mode: "{{ nrinfragent_service_enabled | ternary('auto', 'manual') }}" when: - nrinfragent_state != "absent" - nrinfragent_os_name == 'windows' From 6edb5501191737a80aa9cbc72eda5837833e382d Mon Sep 17 00:00:00 2001 From: Ruben Ruiz de Gauna Date: Tue, 12 Dec 2023 12:03:43 +0100 Subject: [PATCH 3/4] bypass lint --- tasks/install_targz.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tasks/install_targz.yml b/tasks/install_targz.yml index d7d2997..a11a251 100644 --- a/tasks/install_targz.yml +++ b/tasks/install_targz.yml @@ -83,6 +83,8 @@ NRIA_PROXY: "{{ nrinfragent_config['proxy'] | default('') }}" become: true when: archive_contents is defined and archive_contents.changed + tags: + - skip_ansible_lint - name: Start newrelic-infra service: From 0bf1d49b3ac66c00085e4d88b82c2e1d7d1a3106 Mon Sep 17 00:00:00 2001 From: Ruben Ruiz de Gauna Date: Tue, 12 Dec 2023 12:11:22 +0100 Subject: [PATCH 4/4] molecule version --- .github/actions/installation/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/installation/install.sh b/.github/actions/installation/install.sh index ddb0192..782c661 100755 --- a/.github/actions/installation/install.sh +++ b/.github/actions/installation/install.sh @@ -1,7 +1,7 @@ sudo pipx uninstall ansible-core sudo pip3 install 'rich>=10.0.0,<11.0.0' sudo pip3 install ansible-lint[community]==6.13.1 -sudo pip3 install molecule[docker]==4.0.4 +sudo pip3 install molecule[docker]==3.6.1 ansible --version