forked from redhat-cop/infra.aap_configuration
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.ansible-lint
182 lines (160 loc) · 6.2 KB
/
.ansible-lint
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
---
<<<<<<< HEAD
# The exclude_paths does not appear to be working in pre-commit
# this issue describes similar behavior but suggested fix doesn't work
# https://github.com/ansible/ansible-lint/issues/371
# exclude_paths:
# - roles/master_role_example/
exclude_paths:
- '.github/'
- 'roles/master_role_example/'
- 'changelogs/'
- 'tests/templated_role_example'
parseable: true
use_default_rules: true
# https://github.com/ansible/ansible-lint/issues/808
# with verbosity set to 1, its dumping 'unknown file type messages'
# verbosity: 1
=======
# .ansible-lint
profile: production # min, basic, moderate,safety, shared, production
# Allows dumping of results in SARIF format
# sarif_file: result.sarif
# exclude_paths included in this file are parsed relative to this file's location
# and not relative to the CWD of execution. CLI arguments passed to the --exclude
# option are parsed relative to the CWD of execution.
exclude_paths:
- .github/
- changelogs/
- tests/templated_role_example
parseable: true
# quiet: true
# strict: true
# verbosity: 1
# Mock modules or roles in order to pass ansible-playbook --syntax-check
mock_modules:
- ansible.platform.authenticator_map
- ansible.platform.user
- ansible.platform.authenticator
- ansible.platform.role_user_assignment
- ansible.platform.service_node
- ansible.platform.service_key
- ansible.platform.service_cluster
- ansible.platform.organization
- ansible.platform.settings
- ansible.platform.service
- ansible.platform.team
- ansible.platform.application
- ansible.platform.http_port
- ansible.platform.route
- job_wait
# mock_roles:
# - mocked_role
# - author.role_name # old standalone galaxy role
# - fake_namespace.fake_collection.fake_role # role within a collection
# Enable checking of loop variable prefixes in roles
loop_var_prefix: ^(__|{role}_)
# Enforce variable names to follow pattern below, in addition to Ansible own
# requirements, like avoiding python identifiers. To disable add `var-naming`
# to skip_list.
var_naming_pattern: ^[a-z_][a-z0-9_]*$
use_default_rules: true
# Load custom rules from this specific folder
# rulesdir:
# - ./rule/directory/
# Ansible-lint is able to recognize and load skip rules stored inside
# `.ansible-lint-ignore` (or `.config/ansible-lint-ignore.txt`) files.
# To skip a rule just enter filename and tag, like "playbook.yml package-latest"
# on a new line.
# Optionally you can add comments after the tag, prefixed by "#". We discourage
# the use of skip_list below because that will hide violations from the output.
# When putting ignores inside the ignore file, they are marked as ignored, but
# still visible, making it easier to address later.
>>>>>>> 05b830566dcc61b49195ee27848426b7a0a12574
skip_list:
# Skipping fqcn[action] because this collection supports using either the awx.awx or ansible.controller collection
# so a FQCN cannot be used in module names
- fqcn[action]
- fqcn[keyword]
<<<<<<< HEAD
- meta-unsupported-ansible # This collection with the appropriate awx.awx or ansible.controller still works with older ansible.
kinds:
- playbooks: "**/examples/templates/*.{yml,yaml}"
- playbooks: "**/examples/*.{yml,yaml}"
- playbooks: "**/examples/automatetheautomation/*.{yml,yaml}"
- tasks: "**/examples/tasks/*.yml"
- vars: "**/examples/automatetheautomation/orgs_vars/**/*.yml"
- vars: "**/examples/configs/*.yml"
- vars: "**/examples/configs_export_model/*.yml"
- vars: "**/examples/vars/*.yml"
- vars: "**/roles/**/tests/configs/*.yml"
=======
- jinja[spacing]
- meta-runtime # This collection with the appropriate awx.awx or ansible.controller still works with older ansible.
- role-name[path]
- sanity[cannot-ignore] # We're only ignoring sanity rules when we have to
- var-naming[no-role-prefix]
# Ansible-lint does not automatically load rules that have the 'opt-in' tag.
# You must enable opt-in rules by listing each rule 'id' below.
enable_list:
- args
- empty-string-compare # opt-in
- no-log-password # opt-in
- no-same-owner # opt-in
- name[prefix] # opt-in
- galaxy-version-incorrect # opt-in
# add yaml here if you want to avoid ignoring yaml checks when yamllint
# library is missing. Normally its absence just skips using that rule.
- yaml
# Report only a subset of tags and fully ignore any others
# tags:
# - jinja[spacing]
# Ansible-lint does not fail on warnings from the rules or tags listed below
warn_list:
- experimental # experimental is included in the implicit list
# - role-name
# - yaml[document-start] # you can also use sub-rule matches
# Some rules can transform files to fix (or make it easier to fix) identified
# errors. `ansible-lint --fix` will reformat YAML files and run these transforms.
# By default it will run all transforms (effectively `write_list: ["all"]`).
# You can disable running transforms by setting `write_list: ["none"]`.
# Or only enable a subset of rule transforms by listing rules/tags here.
# write_list:
# - all
# Offline mode disables installation of requirements.yml and schema refreshing
offline: true
# Define required Ansible's variables to satisfy syntax check
# extra_vars:
# foo: bar
# multiline_string_variable: |
# line1
# line2
# complex_variable: ":{;\t$()"
# Uncomment to enforce action validation with tasks, usually is not
# needed as Ansible syntax check also covers it.
# skip_action_validation: false
# List of additional kind:pattern to be added at the top of the default
# match list, first match determines the file kind.
# kinds:
# - playbook: "**/examples/*.{yml,yaml}"
# - galaxy: "**/folder/galaxy.yml"
# - tasks: "**/tasks/*.yml"
# - vars: "**/vars/*.yml"
# - meta: "**/meta/main.yml"
# - yaml: "**/*.yaml-too"
# List of additional collections to allow in only-builtins rule.
# only_builtins_allow_collections:
# - example_ns.example_collection
# List of additions modules to allow in only-builtins rule.
# only_builtins_allow_modules:
# - example_module
# Allow setting custom prefix for name[prefix] rule
task_name_prefix: "{stem} | "
# Complexity related settings
# Limit the depth of the nested blocks:
# max_block_depth: 20
# Also recognize these versions of Ansible as supported:
# supported_ansible_also:
# - "2.14"
>>>>>>> 05b830566dcc61b49195ee27848426b7a0a12574
...