Re: [ansible-project] Ansible evaulate dynamic varaible name from vars

2017-01-27 Thread Kai Stian Olstad
On 26.01.2017 14:18, Yordan Borisov wrote: I have vars where I put something like this: vars/main.yml hello_port: 80 world_port: 81 in my ansbile file I load the vars with vars_files: - ./vars/main.yml and after that I have task with iterate using with_items: - debug: m

Re: [ansible-project] Ansible evaulate dynamic varaible name from vars

2017-01-26 Thread Johannes Kastl
On 26.01.17 14:18 Yordan Borisov wrote: > I have vars where I put something like this: > > vars/main.yml > > hello_port: 80 > > world_port: 81 > > > in my ansbile file I load the vars with > vars_files: > - ./vars/main.yml > > and after that I have task with iterate using with_items:

[ansible-project] Ansible evaulate dynamic varaible name from vars

2017-01-26 Thread Yordan Borisov
I have vars where I put something like this: vars/main.yml hello_port: 80 world_port: 81 in my ansbile file I load the vars with vars_files: - ./vars/main.yml and after that I have task with iterate using with_items: - debug: msg: "{{ (item + '_port') }}" with_i