mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-31 03:44:41 +00:00
Merge pull request #1120 from rjeffman/ci_fix_sanity_test_ansible_lint
upstream ci: fix sanity test ansible lint failures
This commit is contained in:
2
.github/workflows/lint.yml
vendored
2
.github/workflows/lint.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
|||||||
pip install "ansible-core >=2.15,<2.16" ansible-lint
|
pip install "ansible-core >=2.15,<2.16" ansible-lint
|
||||||
utils/build-galaxy-release.sh -ki
|
utils/build-galaxy-release.sh -ki
|
||||||
cd .galaxy-build
|
cd .galaxy-build
|
||||||
ansible-lint
|
ansible-lint --profile production --exclude tests/integration/ --exclude tests/unit/ --parseable --nocolor
|
||||||
|
|
||||||
yamllint:
|
yamllint:
|
||||||
name: Verify yamllint
|
name: Verify yamllint
|
||||||
|
|||||||
@@ -1,15 +1,25 @@
|
|||||||
---
|
---
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/ansible/ansible-lint.git
|
- repo: https://github.com/ansible/ansible-lint.git
|
||||||
rev: v6.6.1
|
rev: v6.17.2
|
||||||
hooks:
|
hooks:
|
||||||
- id: ansible-lint
|
- id: ansible-lint
|
||||||
always_run: false
|
always_run: false
|
||||||
pass_filenames: true
|
pass_filenames: true
|
||||||
files: \.(yaml|yml)$
|
files: \.(yaml|yml)$
|
||||||
exclude: /env[^/]*.(yaml|yml)$
|
exclude: /env[^/]*.(yaml|yml)$
|
||||||
entry: |
|
entry: >-
|
||||||
env ANSIBLE_LIBRARY=./plugins/modules ANSIBLE_MODULE_UTILS=./plugins/module_utils ANSIBLE_DOC_FRAGMENT_PLUGINS=./plugins/doc_fragments ansible-lint
|
env
|
||||||
|
ANSIBLE_LIBRARY=./plugins/modules
|
||||||
|
ANSIBLE_MODULE_UTILS=./plugins/module_utils
|
||||||
|
ANSIBLE_DOC_FRAGMENT_PLUGINS=./plugins/doc_fragments
|
||||||
|
ansible-lint
|
||||||
|
--offline
|
||||||
|
--profile production
|
||||||
|
--exclude tests/integration/
|
||||||
|
--exclude tests/unit/
|
||||||
|
--parseable
|
||||||
|
--nocolor
|
||||||
- repo: https://github.com/adrienverge/yamllint.git
|
- repo: https://github.com/adrienverge/yamllint.git
|
||||||
rev: v1.28.0
|
rev: v1.28.0
|
||||||
hooks:
|
hooks:
|
||||||
|
|||||||
@@ -7,4 +7,4 @@ pylint==2.14.4
|
|||||||
wrapt == 1.14.0
|
wrapt == 1.14.0
|
||||||
pydocstyle==6.0.0
|
pydocstyle==6.0.0
|
||||||
yamllint==1.28.0
|
yamllint==1.28.0
|
||||||
ansible-lint==6.6.1
|
ansible-lint
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
[galaxy-importer]
|
[galaxy-importer]
|
||||||
RUN_ANSIBLE_TEST = True
|
RUN_ANSIBLE_TEST = True
|
||||||
RUN_ANSIBLE_LINT = True
|
RUN_ANSIBLE_LINT = False
|
||||||
ANSIBLE_TEST_LOCAL_IMAGE = True
|
ANSIBLE_TEST_LOCAL_IMAGE = True
|
||||||
LOCAL_IMAGE_DOCKER = True
|
LOCAL_IMAGE_DOCKER = True
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ playbook_dirs=(
|
|||||||
"tests"
|
"tests"
|
||||||
"playbooks"
|
"playbooks"
|
||||||
)
|
)
|
||||||
ansible-lint --force-color "${playbook_dirs[@]}"
|
ansible-lint --offline --profile production --exclude tests/integration/ --exclude tests/unit/ --parseable --force-color "${playbook_dirs[@]}"
|
||||||
|
|
||||||
echo -e "${INFO}Running 'ansible-doc-test'...${RST}"
|
echo -e "${INFO}Running 'ansible-doc-test'...${RST}"
|
||||||
python "${topdir}/ansible-doc-test" -v roles plugins
|
python "${topdir}/ansible-doc-test" -v roles plugins
|
||||||
|
|||||||
Reference in New Issue
Block a user