implementing hashes

It seems this should work according to the docs. It does work if I use

with_items: app1

$ cat jj.yml

In the above, app1 and app2 are not hashes, but lists of strings.

I think you would want to define them like:

app2: { base: “foo” }

etc

But really probably

apps:

  • { name: app1, base: foo }
  • { name: app2, base: bar }

tasks:

  • blarg: …
    with_items: apps

Etc.

Let me know if you’d like more detail on some of the above, but that should get you started.

Thanks, Michael. I was able to get something like that working. However, what I ultimately need is the ability to control the order in which app1 and app2 are operated on within certain tasks. For some tasks, I need to operate on app1 first and for others app2 first.

You could still keep the data in the hash and then traverse an array.

thing_details[item][‘hash_key’]

where thing_details is a hash

and you’re traversing across a with_items: thing_names