Hey,
Good work. I'd say get the filters to a standard you're happy with and then
issue a PR - it's free to do so :-)
On Wednesday, 28 January 2015 20:30:12 UTC, Alexey Porotnikov wrote:
>
> Hello.
> I'm iterating through IP addresses (crossing boundary of last octet) by
> writing 2 new jinja2
> filters with obvious function and content: ip2int and int2ip and following
> code
>
> Inventory:
> [something]
> hostname1: start_offset=200 end_offset=399
> hostname2: start_offset=400 end_offset=599
>
> Playbook:
> - name: foo
> bar:
> baz: "BAZZZ={{ (('22.231.8.11' | ip2int) + (item|int)) | int2ip }}"
> with_sequence: start={{ start_offset }} end={{ end_offset }}
>
> It works. Is there an easier way to do this? Or are these filters useful
> enough to spend time on pull request?
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/baf5dafd-bd59-44c3-93d7-7cafc150156a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.