So I am running ansible 2.3.0.0. What I want to do is to have my handlers/main.yml file to include another file (where some handlers are defined) whose name depends on a variable defined somewhere else. i.e.
- include: stuff"{{ myvariable }}".yml where myvariable is defined in the file group_vars/all. I also have [defaults] handler_includes_static = True defined in my ansible.cfg file per https://github.com/ansible/ansible/issues/13485. But when I run it I get the following message: ERROR! Error when evaluating variable in include name: stuff"{{ myvariable }}".yml. When using static includes, ensure that any variables used in their names are defined in vars/vars_files or extra-vars passed in from the command line. Static includes cannot use variables from inventory sources like group or host vars. Where does it want me to define myvariable then? Somewhere in, say, roles/role_in_question/vars/main.yml? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAHEKYV44%2BUNe59LjOw2VhrB8GNJ7fJc9e2QPHJkoPCaiM21N5w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.