Ansible YAML
Direct answer
Ansible configuration is expressed as YAML. Keep indentation consistent, validate before apply/deploy, and use ecosystem-specific dry-run tools plus a general YAML syntax checker.
Typical snippet
- name: Ensure nginx installed
hosts: web
become: true
tasks:
- name: Install nginx
ansible.builtin.package:
name: nginx
state: presentValidation tips
Use ansible-playbook --syntax-check; prefer FQCN module names in modern playbooks.
Related
Common YAML pitfalls here
- Indentation mistakes under nested
spec/stepskeys. - Unquoted values that become booleans in some parsers.
- Copy-pasting tabs from chat or docs sites.
After editing, validate syntax on YAML.cc, then run the ecosystem-native checker.