BIG-IP ASM Automation with Ansible
Hey Matt,
To answer your question i didn't build in any integrity type code to validate if it was a real IP, i did build in code however to determine if the IP or URL had already been inputted into the XML this was to prevent duplication's which would break the XML import.
What i might recommend if you are looking to validate like if its an IPv4 Address or IPv6 you could use the "ipaddr filter (https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters_ipaddr.html) " and register a variable like (is_valid_ip) and run individual checks, might be able to be done in loops and array where your array list of is_valid_ip compares at the same slot as the IP address and only injects when valid.
Hopefully this is what you were asking, feel free to reach out again if this isnt what you are looking for.
Also i have added another set of use-cases to the repository (use-case 6) where Use-case 6 is the same code built into a role (7 is same but with our provisioner uses the juice-shop web front)
Feel free to respond back if i didnt get to your question correctly :)