Skip to content

Commit

Permalink
Docs: Add MD for the playbook-extension rule (#2561)
Browse files Browse the repository at this point in the history
* Docs: Add MD for the playbook-extension rule

* chore: auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
oraNod and pre-commit-ci[bot] authored Oct 6, 2022
1 parent aedd488 commit dd29bc0
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/ansiblelint/rules/playbook_extension.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,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.

0 comments on commit dd29bc0

Please sign in to comment.