Re: [ansible-project] Ansible iterate from file and populate template

2019-08-16 Thread Angel Rengifo Cancino
That's exactly what I'm looking for: how he solved his issue. Unfortunately, he only wanted to solve his problem, but he didn't care about others having the same problem El viernes, 14 de junio de 2019, 12:11:26 (UTC-5), Kai Stian Olstad escribió: > > On 14.06.2019 11:51, Nicola Contu wrote: >

Re: [ansible-project] Ansible iterate from file and populate template

2019-06-14 Thread Kai Stian Olstad
On 14.06.2019 11:51, Nicola Contu wrote: > I found the way to loop and get variables. It's a common courtesy to also provide the solution. Think about the next person that has the same challenge as you only to find your post that basically only say solved it. -- Kai Stian Olstad -- You rece

Re: [ansible-project] Ansible iterate from file and populate template

2019-06-14 Thread Nicola Contu
I found the way to loop and get variables. Thanks a lot Il giorno gio 13 giu 2019 alle ore 15:50 Sebastian Meyer < me...@b1-systems.de> ha scritto: > Hi Nicola, > > On 13.06.19 15:06, Nicola Contu wrote: > > As I have too many vhosts to be created, I got a file from where I would > > like to rea

Re: [ansible-project] Ansible iterate from file and populate template

2019-06-13 Thread Nicola Contu
Hey Sebastian, thanks for your reply. But once I read from the csv how do I get the variables populated and how to iterate? I have something like this now - hosts: dev become: yes become_method: sudo vars: username: "{{ users.0 }}" ad_username: "{{ users.1 }}" vhost_id: "{{ us

Re: [ansible-project] Ansible iterate from file and populate template

2019-06-13 Thread Sebastian Meyer
Hi Nicola, On 13.06.19 15:06, Nicola Contu wrote: > As I have too many vhosts to be created, I got a file from where I would > like to read content, iterate it, populate variables and push the file. > > The file is like this : > 5;yyy;y > 70;;zzz > > I can modify the file to include the

[ansible-project] Ansible iterate from file and populate template

2019-06-13 Thread Nicola Contu
Hello, I have a template with few variables to be populated, then I am shipping that template populated to a another server. Here is my playbook : - hosts: dev become: yes become_method: sudo vars: username: "{{ username }}" ad_username: "{{ ad_username }}" vhost_id: "{{ vhost_