Ansible: ERROR! failed to combine variables, expected dicts but got a 'dict' and a 'AnsibleSequence'
I was slowly refactoring my standard playbooks to roles when I encountered this error. It took me a while to figure out what was wrong. Start: the All-In-One playbook myplaybook.yml - hosts : rhel vars : ... tasks : - name : ... ... This kind of playbook is hard to maintain. Also, some tasks where common to several playbooks, so I've decided to split it into several: myplaybook.yml - hosts : rhel vars : ... tasks : - name : ... include_tasks : path/to/task-1.yml include_tasks : path/to/task-2.yml ... This was nice, but I encountered issues with variables that were not seen by sub-tasks. Must be mentioned that sub-tasks should not include the tasks keyword; only a list of tasks. task-1.yml - name : ... ... Here comes the roles Roles has been precisely designed to split complex tasks into reusable modules. playbooks roles my_custom_role defaults main.yml files my-cert-ad.pem handlers ...