Hi everyone,
I have many groups in my inventory like this:
[website-front-lb]
192.168.1.2
192.168.1.3
[proj1-subproj1-lb]
192.168.1.22
192.168.1.33
etc.
Now I want to access members of a specific group in my playbook. Both to show them or use them in conditionals.
I know that the nested {{}} notation is not possible. Also, {{}} can not be used in conditionals like when. I have tried to use “lookup” plugin without success.
There’s a just a typo:
the extra closing bracket should be removed after proj:
debug: var=groups[proj**]**~‘-’~subproj~‘-lb’] ------> debug: var=groups[proj~‘-’~subproj~‘-lb’]