Use requirements.yml in a lookup?

31 views
Skip to first unread message

Johan

unread,
Feb 29, 2016, 11:05:21 AM2/29/16
to Ansible Project
Hello!

I would like to take my requirements.yml and make a config for https://github.com/beefsack/git-mirror

Any idea for how to accomplish this? I thought about using a lookup somehow, but with requirements.yml already being YAML maybe there is a better way?

Basically I'd like to take each "src: https://github../role-1" in requirements.yml and turn into a file that looks like:

<pre>
ListenAddr = ":8080"
BasePath = "/var/mirror"
Interval = "15m"

[repo]
Origin = "https://github../role-1"

[repo]
Origin = "https://github../role-2"
</pre>

// Johan

Brian Coca

unread,
Mar 1, 2016, 12:28:24 AM3/1/16
to ansible...@googlegroups.com
​vars_files or include_vars will read  a yaml file into a data structure you can then use in template module​

--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/14dcd4d9-55be-4feb-9df3-7b2b0ae4d6c9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
----------
Brian Coca
Reply all
Reply to author
Forward
0 new messages