[ansible-project] Compare two variables

2016-12-01 Thread marcin_zimnica
Hi All, I am trying to compare two variables however it looks like it does not work. I am new to ansible so please be understanding. I know that this script is not optimal but I am still learning. My code looks like this --- - name: change MTU hosts: router connection: local vars: m

[ansible-project] Re: Compare two variables

2016-12-01 Thread marcin_zimnica
Problem solved This is working scenario --- - name: change MTU hosts: router connection: local vars: mtu_1: 'MTU is 1500' contents: "{{ lookup('file', '/home/marcin/var.json') }}" tasks: - name: show ip interface et0/0 ios_command: commands: - sh ip

[ansible-project] with_item and access array to pass separate value each time loop is executed

2016-12-19 Thread marcin_zimnica
Hi, I have following code and trying to figure out how I can pass each value from array access to the eos_config using iteration. I want to run the scripts eos_config only on all access port not routed. - name: change description hosts: arista connection: local vars: access: [] ta