summaryrefslogtreecommitdiffstats
path: root/src/ansiblelint/rules/playbook_extension.md
blob: dd0e475c7959a2623d2edfaa8d6437df23c97577 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# playbook-extension

This rule checks the file extension for playbooks is either `.yml` or `.yaml`.
Ansible playbooks are expressed in YAML format with minimal syntax.

The [YAML syntax](https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html#yaml-syntax) reference provides additional detail.

## Problematic Code

This rule is triggered if Ansible playbooks do not have a file extension or use an unsupported file extension such as `playbook.json` or `playbook.xml`.

## Correct Code

Save Ansible playbooks as valid YAML with the `.yml` or `.yaml` file extension.