[ansible-project] Difficulty differencing list with integers vs list with strings.

2019-08-15 Thread Auralan
Hi everyone, I've been struggling to get the difference between 2 lists in Ansible. List 1 contains numbers as integers. List 2 contains numbers as strings. These obviously cannot be filtered with difference(). Does anyone know a workaround? Or a point where I can make a change in my parsing

Re: [ansible-project] Difficulty differencing list with integers vs list with strings.

2019-08-15 Thread Auralan
in it: - name: "Generate new list." set_fact: device_list_new: "{{ device_list_new | default([]) + [device_list | int] }}" Any further suggestions would be much appreciated. Thanks again to anyone taking time to read this. On Friday, 16 August 2019 01:24:57 U

[ansible-project] Re: execute one task of a playbook locally and the rest on the remote hosts?

2019-08-20 Thread Auralan
Hi, One way to do this is to append your tasks with a when statement in conjunction the special variables