From dd29bc01d8643d7c016281158bde9eb4743d2346 Mon Sep 17 00:00:00 2001 From: Don Naro Date: Thu, 6 Oct 2022 14:51:15 +0100 Subject: [PATCH] Docs: Add MD for the playbook-extension rule (#2561) * 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> --- src/ansiblelint/rules/playbook_extension.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/ansiblelint/rules/playbook_extension.md diff --git a/src/ansiblelint/rules/playbook_extension.md b/src/ansiblelint/rules/playbook_extension.md new file mode 100644 index 0000000000..dd0e475c79 --- /dev/null +++ b/src/ansiblelint/rules/playbook_extension.md @@ -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.