diff --git a/.ansible-lint.yml b/.ansible-lint.yml new file mode 100644 index 0000000..a599c33 --- /dev/null +++ b/.ansible-lint.yml @@ -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: . diff --git a/.woodpecker.yml b/.woodpecker.yml index 8b153b6..cab1fb3 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -3,8 +3,14 @@ when: branch: [main] steps: - - name: lint-ansible - image: python:3.14-slim + - name: install-roles + image: ghcr.io/ansible/community-ansible-dev-tools:latest 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