In Chef I have an array that I would like to print out comma separated, but I would also like to make sure that each of the values exist in another array. Is there a simple one line way of both printing out the array and also validating the contents. In the past I’d done
The current printing only line:
hostgroups <%= n.run_list.roles.to_a.join(",") %>
I’d do it like this: