I am trying to break down some of the frequently performed AWS tasks into roles so that I can use them more nimble in slot machines and get into an unexpected roadblock. I can not figure it out:
This game works perfectly directly with the "group" defined as a list directly in the task:
ec2: image: "{{image}}" region: "{{region}}" group: [ "ssh", "outbound" ] [... other stuff]
But Ansible fails if instead I put the game into roles and define the "groups" in the file "defaults / main.yml" as follows:
groups: ["ssh", "outbound"]
Now the game is as follows:
ec2: image: "{{image}}" region: "{{region}}" group: "{{groups}}" [... other stuff]
Anseible fails with this post, it looks like my variable is a dict, not a list:
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "argument group is of type <type 'dict'> and we were unable to convert to list"}
I either missed something obvious, or ran into an Ansible parsing limitation. Does anyone know this?
source share