I’m having trouble figuring out how to pass non-string parameters to roles.
I’ve tried a few different methods, with the most recent using “vars_files” in the play:
https://github.com/boz/ansible-deploy/blob/multiplay/playbook.yml#L45
This only seems to import the variables into the play; the variables defined in the vars file aren’t visible in the roles.
Ideally I’d be able to parametrize roles with a reference to a compound variable. I’ve tried this, but the roles only receive a stringified version of the hash that I pass in.
The only other options I can see at this point are either passing in a large amount of parameters every time or creating an extra role for every “abstract” role that I want to invoke. Neither of these sound very appealing and so I’m hoping that there’s something that I’m missing. Ideas?
Thanks,
-Adam