Skip to content

Commit

Permalink
feat: Incorporate Ansible-lint for Ansible resource quality assurance
Browse files Browse the repository at this point in the history
Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
  • Loading branch information
brlin-tw committed Aug 27, 2024
1 parent fce19c0 commit eca2dfa
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Ansible-lint configuration file
#
# References:
#
# * Configuration - Ansible Lint Documentation
# https://ansible.readthedocs.io/projects/lint/configuring/
#
# Copyright 2024 林博仁(Buo-ren Lin) <[email protected]>
# SPDX-License-Identifier: CC-BY-SA-4.0 OR LicenseRef-Apache-2.0-If-Not-Used-In-Template-Projects

# Profiles - Ansible Lint Documentation
# https://ansible.readthedocs.io/projects/lint/profiles/
profile: production

exclude_paths:
# Implicit unless exclude_paths is defined in config
- .cache/

# Don't check external Ansible resources
- playbooks/roles/*/
- playbooks/collections/*/
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,6 @@ indent_size = 2
[/LICENSES/*]
indent_size = unset
indent_style = unset

[/.ansible-lint]
indent_size = 2
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,6 @@
# Ignore collections which were acquire externally
/playbooks/collections/*
!/playbooks/collections/README.md

# Do track configuration file of Ansible-lint
!/.ansible-lint
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,8 @@ repos:
(?ix)^(
LICENSES/.*
)$
- repo: https://github.com/ansible/ansible-lint
rev: v24.7.0
hooks:
- id: ansible-lint

0 comments on commit eca2dfa

Please sign in to comment.