Automation · Data Formats › YAML
Scalars
Cheat sheet · https://pcornel.dk/topic.php?topic=5827
Answer
YAML scalars are single values — strings, numbers, booleans, null. Quote strings like "yes", "no", "on" or version numbers such as "1.10", which YAML may otherwise turn into booleans or floats.
Remember
- Unquoted yes, no and on may become booleans.
- 1.10 may become the number 1.1.
- Quote strings that look like other types.
First checks
yq '.value | tag' file.yaml— resolved type (!!str, !!int, !!bool)- Quote strings like 'no', 'on', '012' — avoid implicit typing
yamllint file.yaml— truthy rule
Verify in this order
scalar text → resolved type
Where it usually breaks
Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5827