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/1d248f04-24d7-436f-a0f7-d18f5cc269bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.