summaryrefslogtreecommitdiffstats
path: root/src/ansiblelint/rules/playbook_extension.md
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:06:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:06:49 +0000
commit2fe34b6444502079dc0b84365ce82dbc92de308e (patch)
tree8fedcab52bbbc3db6c5aa909a88a7a7b81685018 /src/ansiblelint/rules/playbook_extension.md
parentInitial commit. (diff)
downloadansible-lint-2fe34b6444502079dc0b84365ce82dbc92de308e.tar.xz
ansible-lint-2fe34b6444502079dc0b84365ce82dbc92de308e.zip
Adding upstream version 6.17.2.upstream/6.17.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/ansiblelint/rules/playbook_extension.md')
-rw-r--r--src/ansiblelint/rules/playbook_extension.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/ansiblelint/rules/playbook_extension.md b/src/ansiblelint/rules/playbook_extension.md
new file mode 100644
index 0000000..dd0e475
--- /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.