From 8d984e194b71373f968114307c900cd51934b058 Mon Sep 17 00:00:00 2001 From: L3D Date: Tue, 25 Apr 2023 14:50:48 +0200 Subject: [PATCH] Improve linting --- .github/workflows/ansible-linting-check.yml | 27 +++++++++++++++++++++ .github/workflows/yamllint.yaml | 2 -- .gitignore | 1 + .yamllint | 1 + README.md | 2 -- 5 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/ansible-linting-check.yml diff --git a/.github/workflows/ansible-linting-check.yml b/.github/workflows/ansible-linting-check.yml new file mode 100644 index 0000000..2d43287 --- /dev/null +++ b/.github/workflows/ansible-linting-check.yml @@ -0,0 +1,27 @@ +--- +name: Ansible Lint check + +# yamllint disable-line rule:truthy +on: + push: + branches: '*' + pull_request: + branches: '*' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: 'checkout git repo' + uses: actions/checkout@v3 + with: + lfs: true + submodules: true + fetch-depth: 0 + + - name: 'Lint Ansible Playbook' + uses: ansible/ansible-lint-action@v6 + with: + path: "site.yml" diff --git a/.github/workflows/yamllint.yaml b/.github/workflows/yamllint.yaml index 39c49f8..c4894bd 100644 --- a/.github/workflows/yamllint.yaml +++ b/.github/workflows/yamllint.yaml @@ -18,5 +18,3 @@ jobs: yamllint_config_filepath: './.yamllint' yamllint_strict: false yamllint_comment: true -# env: -# GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN } diff --git a/.gitignore b/.gitignore index a87d544..5159f69 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ tags *.retry *.vault .vault +ansible/ diff --git a/.yamllint b/.yamllint index cf28cef..eadb400 100644 --- a/.yamllint +++ b/.yamllint @@ -14,3 +14,4 @@ ignore: | host_vars/services.l3d.space/vault.yml group_vars/all/vault.yml roles/ + ansible/ diff --git a/README.md b/README.md index 06d3137..25d8659 100644 --- a/README.md +++ b/README.md @@ -25,5 +25,3 @@ git config --global diff.ansible-vault.textconv "ansible-vault view" ### Standard Playbook Das standard Playook ist ``site.yml``. Womöglich sind hier andere Playbooks eingebunden... - -### best practise Ansible-Vault: