Debian Codegraph @

.ansible-lint

raw
1 ---
2 # .ansible-lint
3
4 profile: null # min, basic, moderate,safety, shared, production
5
6 # Allows dumping of results in SARIF format
7 # sarif_file: result.sarif
8
9 # exclude_paths included in this file are parsed relative to this file's location
10 # and not relative to the CWD of execution. CLI arguments passed to the --exclude
11 # option are parsed relative to the CWD of execution.
12 exclude_paths:
13 - .cache/ # implicit unless exclude_paths is defined in config
14 - test/fixtures/formatting-before/
15 - test/fixtures/formatting-prettier/
16 # quiet: true
17 # strict: true
18 # verbosity: 1
19
20 # Mock modules or roles in order to pass ansible-playbook --syntax-check
21 mock_modules:
22 - zuul_return
23 # note the foo.bar is invalid as being neither a module or a collection
24 - fake_namespace.fake_collection.fake_module
25 - fake_namespace.fake_collection.fake_module.fake_submodule
26 mock_roles:
27 - mocked_role
28 - author.role_name # old standalone galaxy role
29 - fake_namespace.fake_collection.fake_role # role within a collection
30
31 # Enable checking of loop variable prefixes in roles
32 loop_var_prefix: "^(__|{role}_)"
33
34 # Enforce variable names to follow pattern below, in addition to Ansible own
35 # requirements, like avoiding python identifiers. To disable add `var-naming`
36 # to skip_list.
37 var_naming_pattern: "^[a-z_][a-z0-9_]*$"
38
39 use_default_rules: true
40 # Load custom rules from this specific folder
41 # rulesdir:
42 # - ./rule/directory/
43
44 # Ansible-lint is able to recognize and load skip rules stored inside
45 # `.ansible-lint-ignore` (or `.config/ansible-lint-ignore.txt`) files.
46 # To skip a rule just enter filename and tag, like "playbook.yml package-latest"
47 # on a new line.
48 # Optionally you can add comments after the tag, prefixed by "#". We discourage
49 # the use of skip_list below because that will hide violations from the output.
50 # When putting ignores inside the ignore file, they are marked as ignored, but
51 # still visible, making it easier to address later.
52 skip_list:
53 - skip_this_tag
54
55 # Ansible-lint does not automatically load rules that have the 'opt-in' tag.
56 # You must enable opt-in rules by listing each rule 'id' below.
57 enable_list:
58 - args
59 - empty-string-compare # opt-in
60 - no-log-password # opt-in
61 - no-same-owner # opt-in
62 - name[prefix] # opt-in
63 - galaxy-version-incorrect # opt-in
64 # add yaml here if you want to avoid ignoring yaml checks when yamllint
65 # library is missing. Normally its absence just skips using that rule.
66 - yaml
67 # Report only a subset of tags and fully ignore any others
68 # tags:
69 # - jinja[spacing]
70
71 # Ansible-lint does not fail on warnings from the rules or tags listed below
72 warn_list:
73 - skip_this_tag
74 - experimental # experimental is included in the implicit list
75 # - role-name
76 # - yaml[document-start] # you can also use sub-rule matches
77
78 # Some rules can transform files to fix (or make it easier to fix) identified
79 # errors. `ansible-lint --fix` will reformat YAML files and run these transforms.
80 # By default it will run all transforms (effectively `write_list: ["all"]`).
81 # You can disable running transforms by setting `write_list: ["none"]`.
82 # Or only enable a subset of rule transforms by listing rules/tags here.
83 # write_list:
84 # - all
85
86 # Offline mode disables installation of requirements.yml and schema refreshing
87 offline: true
88
89 # Define required Ansible's variables to satisfy syntax check
90 extra_vars:
91 foo: bar
92 multiline_string_variable: |
93 line1
94 line2
95 complex_variable: ":{;\t$()"
96
97 # Uncomment to enforce action validation with tasks, usually is not
98 # needed as Ansible syntax check also covers it.
99 # skip_action_validation: false
100
101 # List of additional kind:pattern to be added at the top of the default
102 # match list, first match determines the file kind.
103 kinds:
104 # - playbook: "**/examples/*.{yml,yaml}"
105 # - galaxy: "**/folder/galaxy.yml"
106 # - tasks: "**/tasks/*.yml"
107 # - vars: "**/vars/*.yml"
108 # - meta: "**/meta/main.yml"
109 - yaml: "**/*.yaml-too"
110
111 # List of additional collections to allow in only-builtins rule.
112 # only_builtins_allow_collections:
113 # - example_ns.example_collection
114
115 # List of additions modules to allow in only-builtins rule.
116 # only_builtins_allow_modules:
117 # - example_module
118
119 # Allow setting custom prefix for name[prefix] rule
120 task_name_prefix: "{stem} | "
121 # Complexity related settings
122
123 # Limit the depth of the nested blocks:
124 # max_block_depth: 20
125
126 # Also recognize these versions of Ansible as supported:
127 # supported_ansible_also:
128 # - "2.18"