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

2019-08-15 Thread Auralan
Hello Gaurav, Thank you for your reply. I should have mentioned that I have previously tried making the int filter work in the "device_list" task. Inserting it just before the list filter, however, doesn't seem to work. It claims to not accept the resulting integer: fatal: [some_switch]:

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

2019-08-15 Thread gaurav thosani
Auralan, Wondering if jinja2 typecasting could be attempted for your use case Reference: https://stackoverflow.com/questions/39938323/jinja-convert-string-to-integer?rq=1 Gaurav Thosani On Thu, Aug 15, 2019 at 3:09 PM Auralan wrote: > Hi everyone, > > I've been struggling to get the

[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