I stuck with make many files from template

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.

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.

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

`

I did it. Role on github.