How to split an ansible role’s `defaults/main.yml` file into multiple files?
The feature I’m describing below has been available since Ansible 2.6, but got a bugfix in v2.6.2 and another (minor) one in v2.7. To see a solution for older versions, see Paul’s answer. defaults/main/ Instead of creating defaults/main.yml, create a directory — defaults/main/ — and place all YAML files in there. defaults/main.yml → defaults/main/*.yml Ansible … Read more