This commit is contained in:
@@ -0,0 +1,19 @@
|
|||||||
|
# .ansible-lint
|
||||||
|
---
|
||||||
|
# Exclude paths from linting
|
||||||
|
exclude_paths:
|
||||||
|
- .cache/
|
||||||
|
- .github/
|
||||||
|
- tests/
|
||||||
|
- molecule/
|
||||||
|
- roles/
|
||||||
|
|
||||||
|
# Enable specific profiles (min, basic, moderate, safety, shared, production)
|
||||||
|
profile: moderate
|
||||||
|
|
||||||
|
warn_list:
|
||||||
|
- skip_this_tag
|
||||||
|
- experimental
|
||||||
|
|
||||||
|
# Set the project directory
|
||||||
|
project_dir: .
|
||||||
+9
-3
@@ -3,8 +3,14 @@ when:
|
|||||||
branch: [main]
|
branch: [main]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: lint-ansible
|
- name: install-roles
|
||||||
image: python:3.14-slim
|
image: ghcr.io/ansible/community-ansible-dev-tools:latest
|
||||||
commands:
|
commands:
|
||||||
- pip install ansible-lint
|
- ansible-galaxy role install -r requirements.yml -p "$CI_WORKSPACE/roles"
|
||||||
|
- ansible-galaxy collection install -r requirements.yml -p "$CI_WORKSPACE/collections"
|
||||||
|
|
||||||
|
- name: lint-ansible
|
||||||
|
image: ghcr.io/ansible/community-ansible-dev-tools:latest
|
||||||
|
commands:
|
||||||
|
- git config --global --add safe.directory "$CI_WORKSPACE"
|
||||||
- ansible-lint --force-color
|
- ansible-lint --force-color
|
||||||
|
|||||||
Reference in New Issue
Block a user