-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from richm/ansible-lint-6.x-fixes
ansible-lint 6.x fixes; add ansible-lint github action
- Loading branch information
Showing
80 changed files
with
295 additions
and
262 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,18 @@ | ||
--- | ||
skip_list: | ||
- '303' # Using command rather than module for yum/dnf | ||
- fqcn-builtins | ||
exclude_paths: | ||
- tests/roles/ | ||
- .github/ | ||
- examples/roles/ | ||
kinds: | ||
- yaml: "**/meta/collection-requirements.yml" | ||
- yaml: "**/tests/collection-requirements.yml" | ||
- playbook: "**/tests/tests_*.yml" | ||
- playbook: "**/tests/setup-snapshot.yml" | ||
- tasks: "**/tests/*.yml" | ||
- playbook: "**/tests/playbooks/*.yml" | ||
- tasks: "**/tests/tasks/*.yml" | ||
- tasks: "**/tests/tasks/*/*.yml" | ||
- vars: "**/tests/vars/*.yml" | ||
- playbook: "**/examples/*.yml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
name: Ansible Lint | ||
on: # yamllint disable-line rule:truthy | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
jobs: | ||
ansible_lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
- name: Fix up role meta/main.yml namespace and name | ||
run: | | ||
set -euxo pipefail | ||
mm=meta/main.yml | ||
if [ -f "$mm" ]; then | ||
if ! grep -q '^ *namespace:' "$mm"; then | ||
sed "/galaxy_info:/a\ namespace: performancecopilot" -i "$mm" | ||
fi | ||
if ! grep -q '^ *role_name:' "$mm"; then | ||
sed "/galaxy_info:/a\ role_name: metrics" -i "$mm" | ||
fi | ||
fi | ||
- name: Run ansible-lint | ||
uses: ansible-community/ansible-lint-action@v6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,30 +5,21 @@ on: # yamllint disable-line rule:truthy | |
- push | ||
env: | ||
TOX_LSR: "git+https://github.com/linux-system-roles/[email protected]" | ||
LSR_ROLE2COLL_NAMESPACE: "performancecopilot" | ||
LSR_ROLE2COLL_NAME: "metrics" | ||
LSR_ROLE2COLL_NAMESPACE: performancecopilot | ||
LSR_ROLE2COLL_NAME: metrics | ||
LSR_ANSIBLE_TEST_DOCKER: "true" | ||
LSR_ANSIBLES: 'ansible==2.9.*' | ||
LSR_MSCENARIOS: default | ||
# LSR_EXTRA_PACKAGES: libdbus-1-dev | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
jobs: | ||
python: | ||
strategy: | ||
matrix: | ||
pyver_os: | ||
- ver: '2.7' | ||
os: ubuntu-20.04 | ||
- ver: '3.6' | ||
os: ubuntu-20.04 | ||
- ver: '3.8' | ||
os: ubuntu-latest | ||
- ver: '3.9' | ||
os: ubuntu-latest | ||
- ver: '3.10' | ||
os: ubuntu-latest | ||
- ver: '3.11' | ||
os: ubuntu-latest | ||
runs-on: ${{ matrix.pyver_os.os }} | ||
steps: | ||
- name: checkout PR | ||
|
@@ -49,13 +40,8 @@ jobs: | |
run: | | ||
set -euxo pipefail | ||
toxpyver=$(echo "${{ matrix.pyver_os.ver }}" | tr -d .) | ||
toxenvs="py${toxpyver}" | ||
case "$toxpyver" in | ||
27) toxenvs="${toxenvs},coveralls,flake8,pylint" ;; | ||
36) toxenvs="${toxenvs},coveralls,black,yamllint,shellcheck" ;; | ||
38) toxenvs="${toxenvs},coveralls,ansible-lint,ansible-plugin-scan,collection,ansible-test" ;; | ||
39) toxenvs="${toxenvs},coveralls,ansible-managed-var-comment" ;; | ||
310) toxenvs="${toxenvs},coveralls" ;; | ||
311) toxenvs="${toxenvs},coveralls" ;; | ||
38) toxenvs="ansible-plugin-scan,collection,ansible-test" ;; | ||
39) toxenvs="shellcheck,ansible-managed-var-comment" ;; | ||
esac | ||
TOXENV="$toxenvs" lsr_ci_runtox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,5 @@ | ||
# SPDX-License-Identifier: MIT | ||
--- | ||
extends: .yamllint_defaults.yml | ||
# possible customizations over the base yamllint config | ||
# skip the yaml files in the /tests/ directory | ||
# NOTE: If you want to customize `ignore` you'll have to | ||
# copy in all of the config from .yamllint.yml, then | ||
# add your own - so if you want to just add /tests/ to | ||
# be ignored, you'll have to add the ignores from the base | ||
# ignore: | | ||
# /tests/ | ||
# /.tox/ | ||
# skip checking line length | ||
# NOTE: the above does not apply to `rules` - you do not | ||
# have to copy all of the rules from the base config | ||
ignore: | | ||
/.tox/ | ||
extends: default |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
### REQUIRED | ||
namespace: performancecopilot | ||
name: metrics | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
--- | ||
|
||
bpftrace_users: | ||
- { user: metrics } | ||
- {user: metrics} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.