That's an interesting strategy for getting the sources.list.d
configured, but it relies on the fact that that line defining a deb
repository can take multiple components 'deb
http://mirrors.us.kernel.org/ubuntu/ precise main universe', so I'm no
clearer on the real question about iterating over a dict with a sub-list.
(although it also made me notice that I want to sort the dict and it's
not immediately obvious how to do so: "with_dict: apt_repositories |
dictsort" doesn't work - I think because dictsort yields a list of
key,value pairs not a real dict).
Thanks for the helpful reply!
Duncan Hutty
On 2/5/15 11:18, Matt Martz wrote:
I'm guessing what you want is:
apt_repository: repo="deb {{item.value.uri}} {{
ansible_distribution_release }}{{ item.value.suffix }} {{
item.components|join(" ") }}" state=present
This just uses the 'join' filter to join that components list into a
space separated string.
--
You received this message because you are subscribed to the Google Groups "Ansible
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/54D3A339.1050005%40allgoodbits.org.
For more options, visit https://groups.google.com/d/optout.