Is it possible to set a fact of a list in Ansible?

Question:

Is it possible to set a fact containing a list in Ansible using set_fact? What’s the correct syntax for it?

Answer:

Indeed it is. You need to quote the entire list though:

The above tasks should generate the following output:

Leave a Reply