|
| 1 | +--- |
| 2 | +# .ansible-lint |
| 3 | +# exclude_paths included in this file are parsed relative to this file's location |
| 4 | +# and not relative to the CWD of execution. CLI arguments passed to the --exclude |
| 5 | +# option will be parsed relative to the CWD of execution. |
| 6 | +exclude_paths: |
| 7 | + - .cache/ # implicit unless exclude_paths is defined in config |
| 8 | + - .github/ |
| 9 | + - test/fixtures/formatting-before/ |
| 10 | + - test/fixtures/formatting-prettier/ |
| 11 | +# parseable: true |
| 12 | +# quiet: true |
| 13 | +# verbosity: 1 |
| 14 | + |
| 15 | +# Mock modules or roles in order to pass ansible-playbook --syntax-check |
| 16 | +mock_modules: |
| 17 | + - zuul_return |
| 18 | + # note the foo.bar is invalid as being neither a module or a collection |
| 19 | + - fake_namespace.fake_collection.fake_module |
| 20 | + - fake_namespace.fake_collection.fake_module.fake_submodule |
| 21 | +mock_roles: |
| 22 | + - mocked_role |
| 23 | + - author.role_name # old standalone galaxy role |
| 24 | + - fake_namespace.fake_collection.fake_role # role within a collection |
| 25 | + |
| 26 | +# Enable checking of loop variable prefixes in roles |
| 27 | +loop_var_prefix: "{role}_" |
| 28 | + |
| 29 | +# Enforce variable names to follow pattern below, in addition to Ansible own |
| 30 | +# requirements, like avoiding python identifiers. To disable add `var-naming` |
| 31 | +# to skip_list. |
| 32 | +# var_naming_pattern: "^[a-z_][a-z0-9_]*$" |
| 33 | + |
| 34 | +use_default_rules: true |
| 35 | +# Load custom rules from this specific folder |
| 36 | +# rulesdir: |
| 37 | +# - ./rule/directory/ |
| 38 | + |
| 39 | +# This makes linter to fully ignore rules/tags listed below |
| 40 | +skip_list: |
| 41 | + - skip_this_tag |
| 42 | + - git-latest |
| 43 | + |
| 44 | +# Any rule that has the 'opt-in' tag will not be loaded unless its 'id' is |
| 45 | +# mentioned in the enable_list: |
| 46 | +enable_list: |
| 47 | + - empty-string-compare # opt-in |
| 48 | + - no-log-password # opt-in |
| 49 | + - no-same-owner # opt-in |
| 50 | + # add yaml here if you want to avoid ignoring yaml checks when yamllint |
| 51 | + # library is missing. Normally its absence just skips using that rule. |
| 52 | + - yaml |
| 53 | +# Report only a subset of tags and fully ignore any others |
| 54 | +# tags: |
| 55 | +# - jinja[spacing] |
| 56 | + |
| 57 | +# This makes the linter display but not fail for rules/tags listed below: |
| 58 | +warn_list: |
| 59 | + - skip_this_tag |
| 60 | + - git-latest |
| 61 | + - experimental # experimental is included in the implicit list |
| 62 | + # - role-name |
| 63 | + # - yaml[document-start] # you can also use sub-rule matches |
| 64 | + |
| 65 | +# Some rules can transform files to fix (or make it easier to fix) identified |
| 66 | +# errors. `ansible-lint --write` will reformat YAML files and run these transforms. |
| 67 | +# By default it will run all transforms (effectively `write_list: ["all"]`). |
| 68 | +# You can disable running transforms by setting `write_list: ["none"]`. |
| 69 | +# Or only enable a subset of rule transforms by listing rules/tags here. |
| 70 | +# write_list: |
| 71 | +# - all |
| 72 | + |
| 73 | +# Offline mode disables installation of requirements.yml |
| 74 | +offline: false |
| 75 | + |
| 76 | +# Define required Ansible's variables to satisfy syntax check |
| 77 | +extra_vars: |
| 78 | + foo: bar |
| 79 | + multiline_string_variable: | |
| 80 | + line1 |
| 81 | + line2 |
| 82 | + complex_variable: ":{;\t$()" |
| 83 | + |
| 84 | +# Uncomment to enforce action validation with tasks, usually is not |
| 85 | +# needed as Ansible syntax check also covers it. |
| 86 | +# skip_action_validation: false |
| 87 | + |
| 88 | +# List of additional kind:pattern to be added at the top of the default |
| 89 | +# match list, first match determines the file kind. |
| 90 | +kinds: |
| 91 | + # - playbook: "**/examples/*.{yml,yaml}" |
| 92 | + # - galaxy: "**/folder/galaxy.yml" |
| 93 | + # - tasks: "**/tasks/*.yml" |
| 94 | + # - vars: "**/vars/*.yml" |
| 95 | + # - meta: "**/meta/main.yml" |
| 96 | + - yaml: "**/*.yaml-too" |
0 commit comments