[ansible-project] Re: dict merge - with_dict expects a dict

2015-03-12 Thread Jonathan Davila
so I've got a working sample for you. This is the exact test I did. --- - name: Template Test For Route File connection: local hosts: localhost vars: host_routes: route-oob: device: bond.123 routes: 10.118.0.0/16: '10.118.255.254' route-int:

[ansible-project] Re: dict merge - with_dict expects a dict

2015-03-12 Thread John McNulty
Hi, For just processing host_routes I had. - name: Write network routes template: src=route.j2 dest={{ net_path}}/route-{{ item.value.device }} mode=0644 owner=root group=root with_dict: host_routes when: item.value.routes is defined tags: netdev And the template was .. {%

[ansible-project] Re: dict merge - with_dict expects a dict

2015-03-11 Thread John McNulty
Hi again. Thanks .. I got so hung up on using with_dict I didn't consider taking another tack. I'm reconsidering the decision to not to use hash_behaviour=merge as that solves my problem + would also come in handy elsewhere, like combining default sysctl parameter changes with additional

[ansible-project] Re: dict merge - with_dict expects a dict

2015-03-11 Thread Jonathan Davila
Does my example above help you as far as the templating piece? Personally I would abstract out the desired state for the route-file status into it's own dict to smth like this: route_file_state: routes-other: present routes-ext: absent would prevent that extra attribute from

[ansible-project] Re: dict merge - with_dict expects a dict

2015-03-11 Thread Jonathan Davila
Would you mind sharing the full body of the task that pertains to this as well as the template file? On Tuesday, March 10, 2015 at 12:19:46 PM UTC-4, John McNulty wrote: So the reason why I tried using union was this github issue ( https://github.com/ansible/ansible/issues/7495 ) which

[ansible-project] Re: dict merge - with_dict expects a dict

2015-03-11 Thread John McNulty
Yes, I can work with that. Thanks for your help. On Wednesday, 11 March 2015 17:15:58 UTC, Jonathan Davila wrote: Does my example above help you as far as the templating piece? Personally I would abstract out the desired state for the route-file status into it's own dict to smth like