I stuck with make many files from template

50 views
Skip to first unread message

Шалыгин Константин

unread,
Jun 1, 2015, 8:44:22 AM6/1/15
to ansible...@googlegroups.com
Hello. I develop role for make conf's OpenVPN server/client side. I need minimum two OpenVPN tunnels on each router. I don't found the way for deploy more then one conf's.

Pushed for test https://github.com/k0ste/ansible-role-openvpn

Try it, start playbook as is and see, ansible can create many files from template, but inside file is identical for all list (openvpn_server/openvpn_client);

Any ideas?

P.S.: sorry 4 bad English.

James Cammarata

unread,
Jun 1, 2015, 10:28:09 AM6/1/15
to ansible...@googlegroups.com
Hi, based on your use-case I believe with_dict would be more useful to you than with_flattened, as the later is mainly used to flatten multiple lists into a single list.

James Cammarata
Director, Ansible Core Engineering
github: jimi-c

--
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/d0470564-5c61-44c9-953b-2cff06447caf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Шалыгин Константин

unread,
Jun 2, 2015, 1:52:04 AM6/2/15
to ansible...@googlegroups.com
I try with_dict, the same. I rewrite role for test it https://github.com/k0ste/ansible-role-openvpn-dict

If I do poorly explained - need to stop the execution of the file, after params for openvpn1 is reached, and start the new file.

openvpn_dict:
  openvpn1
:
   
params
  openvpn2
:
   
params


Шалыгин Константин

unread,
Oct 15, 2015, 8:26:50 AM10/15/15
to Ansible Project
I did it. Role on github.
Reply all
Reply to author
Forward
0 new messages