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..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]==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]==3.6.1 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 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: 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'