-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added pre-commit configuration for ansible-lint (#93)
Co-authored-by: willtome <[email protected]>
- Loading branch information
1 parent
d7e9ad6
commit 2ee334f
Showing
42 changed files
with
187 additions
and
133 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
--- | ||
profile: production | ||
offline: false | ||
|
||
skip_list: | ||
- "galaxy[no-changelog]" | ||
|
||
exclude_paths: | ||
# would be better to move the roles here to the top-level roles directory | ||
- collections/ansible_collections/demo/compliance/roles/ | ||
- roles/redhatofficial.* | ||
- .github/ |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/ansible/ansible-lint.git | ||
# get latest release tag from https://github.com/ansible/ansible-lint/releases/ | ||
rev: v6.18.0 | ||
hooks: | ||
- id: ansible-lint | ||
additional_dependencies: | ||
- 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
extends: default | ||
|
||
rules: | ||
line-length: disable | ||
trailing-spaces: enable | ||
colons: | ||
max-spaces-before: 0 | ||
max-spaces-after: -1 | ||
indentation: | ||
level: error | ||
indent-sequences: true # consistent with ansible-lint | ||
truthy: | ||
level: error | ||
allowed-values: | ||
- 'true' | ||
- 'false' | ||
|
||
... |
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
1 change: 1 addition & 0 deletions
1
collections/ansible_collections/demo/cloud/roles/aws/vars/snapshot_vm.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
# Set stat_snapshots with model: | ||
# [ | ||
# { | ||
|
1 change: 1 addition & 0 deletions
1
collections/ansible_collections/demo/patching/roles/build_report_network/tasks/main.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
- name: Create web directory if it does not exist | ||
ansible.builtin.file: | ||
path: "{{ file_path }}" | ||
|
1 change: 1 addition & 0 deletions
1
collections/ansible_collections/demo/patching/roles/build_report_network/vars/main.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
file_path: "{{ web_path | default('/var/www/html/reports') }}" | ||
vendor: | ||
ios: &my_value 'Cisco' | ||
|
1 change: 1 addition & 0 deletions
1
collections/ansible_collections/demo/patching/roles/build_report_windows/tasks/main.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
- name: Create HTML report | ||
ansible.builtin.template: | ||
src: report.j2 | ||
|
1 change: 1 addition & 0 deletions
1
collections/ansible_collections/demo/patching/roles/build_report_windows/vars/main.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
--- | ||
file_path: /var/www/html |
1 change: 1 addition & 0 deletions
1
...ions/ansible_collections/demo/patching/roles/build_report_windows_patch/defaults/main.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
email_from: [email protected] | ||
to_emails: [email protected],[email protected] | ||
to_emails_list: "{{ to_emails.split(',') }}" |
1 change: 1 addition & 0 deletions
1
...ections/ansible_collections/demo/patching/roles/build_report_windows_patch/tasks/main.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
- name: Create HTML report | ||
ansible.builtin.template: | ||
src: report.j2 | ||
|
1 change: 1 addition & 0 deletions
1
collections/ansible_collections/demo/patching/roles/build_report_windows_patch/vars/main.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
--- | ||
file_path: /var/www/html |
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
1 change: 1 addition & 0 deletions
1
collections/ansible_collections/demo/patching/roles/report_linux/tasks/main.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
- name: Create HTML report | ||
ansible.builtin.template: | ||
src: report.j2 | ||
|
1 change: 1 addition & 0 deletions
1
collections/ansible_collections/demo/patching/roles/report_linux/vars/main.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
--- | ||
file_path: /var/www/html/reports |
1 change: 1 addition & 0 deletions
1
collections/ansible_collections/demo/patching/roles/report_linux_patching/defaults/main.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
email_from: [email protected] | ||
to_emails: [email protected],[email protected] | ||
to_emails_list: "{{ to_emails.split(',') }}" |
1 change: 1 addition & 0 deletions
1
collections/ansible_collections/demo/patching/roles/report_linux_patching/tasks/main.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
- name: Create HTML report | ||
ansible.builtin.template: | ||
src: report.j2 | ||
|
1 change: 1 addition & 0 deletions
1
collections/ansible_collections/demo/patching/roles/report_linux_patching/vars/main.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
--- | ||
file_path: /var/www/html/reports |
1 change: 1 addition & 0 deletions
1
collections/ansible_collections/demo/patching/roles/report_windows_patching/tasks/main.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
- name: Create HTML report | ||
ansible.windows.win_template: | ||
src: report.j2 | ||
|
2 changes: 1 addition & 1 deletion
2
collections/ansible_collections/demo/satellite/roles/register_host/defaults/main.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
instance_name: "{{ inventory_hostname | regex_replace('_', '-') }}" | ||
activation_key: "{{ 'RHEL' + ansible_distribution_major_version + '_' + env }}" | ||
rex_user: root # "{{ ansible_user }}" | ||
rex_user: root # "{{ ansible_user }}" | ||
force_register: true |
1 change: 1 addition & 0 deletions
1
collections/ansible_collections/demo/satellite/roles/scap_client/defaults/main.yaml
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
Oops, something went wrong.