forked from redhat-cop/infra.aap_configuration
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request redhat-cop#77 from mshriver/add-pre-commit2
Add and apply pre-commit
- Loading branch information
Showing
35 changed files
with
181 additions
and
208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
ansible | ||
docker | ||
docker-compose | ||
jmespath | ||
jmespath |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.2.0 | ||
hooks: | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/adrienverge/yamllint.git | ||
rev: v1.24.2 | ||
hooks: | ||
- id: yamllint | ||
entry: yamllint -c .github/workflow-config/.yamllint.yml | ||
types: [yaml] | ||
- repo: https://github.com/ansible/ansible-lint.git | ||
rev: v4.3.3 | ||
hooks: | ||
# see discussions here about what arguments are used, and behavior | ||
# https://github.com/ansible/ansible-lint/issues/649 | ||
# Roles will trigger an "unknown file type" | ||
# https://github.com/ansible/ansible-lint/issues/808 | ||
- id: ansible-lint | ||
pass_filenames: false | ||
always_run: true | ||
entry: "ansible-lint -c .github/workflow-config/.ansiblelint.yml --exclude=roles/master_role_example" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,4 @@ rules: | |
- 'True' | ||
- 'False' | ||
- 'true' | ||
- 'false' | ||
- 'false' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# This workflow action will run pre-commit, which will execute ansible and yaml linting | ||
# See .github/workflow-config/.pre-commit-config.yml for what hooks are executed | ||
name: Yaml and Ansible Lint | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
- name: Install Collections | ||
run: | | ||
sudo apt install software-properties-common | ||
sudo apt-add-repository --yes --update ppa:ansible/ansible | ||
sudo apt install ansible | ||
ansible-galaxy collection install -f -r .github/collections/requirements.yml | ||
- name: Hack pre-commit | ||
# https://github.com/pre-commit/action/issues/44 | ||
run: | | ||
sudo cp .github/workflow-config/.pre-commit-config.yml .pre-commit-config.yaml | ||
- uses: pre-commit/action@v2.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
collections/* | ||
!collections/requirements.yml | ||
!collections/requirements.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,4 +25,4 @@ tags: | |
- collection | ||
- tower_configuration | ||
dependencies: | ||
awx.awx: "*" | ||
awx.awx: "*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,8 +8,7 @@ | |
"inputs": { | ||
"username": "person", | ||
"password": "password" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
|
Oops, something went wrong.