Forum Discussion
SNAT Error While Using Ansible to Create a VS in BigIP
can you try following the procedure in this url: http://clouddocs.f5.com/training/community/gsts/html/class1/module2/lab05.html
I noticed that on the reference url, snat is defined higher up the list compare to yours, its in the bottom.
can you try modifying your playbook and somewhat copy what is in the reference url? share any errors when you run the playbook after the change.
when running your playbook, since you are getting an error, can you enable verbose logging and share the output? see this url:
http://clouddocs.f5.com/training/community/gsts/html/class1/module4/module4.html
hopefully, this will give more verbose output on the errors received.
- smandru_360193May 04, 2018Nimbostratus
I had interchanged the modules/arguments to the way it is showed in the reference url, but had no luck, i got the same error
bigip_virtual_server: destination: DEST_IP password: MY_PASS name: VS_NAME pool: POOL_NAME port: 80 server: xxx.com snat: Automap user: admin all_profiles: - tcp - http validate_certs: no
error
fatal: [xxx.com]: FAILED! => {"changed": false, "failed": true, "msg": "received exception: Error on updating Virtual Server : Error on setting snat : Method not found: 'LocalLB.VirtualServer.LocalLB.VirtualServerPort.get_source_address_translation_type'"}
I had the same job run it in verbose mode and this is the output i got
TASK [Create virtual server] ********************************************************************************************************************* task path: /etc/ansible/f5-virt.yml:6 Using module file /usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_virtual_server.py ESTABLISH LOCAL CONNECTION FOR USER: root EXEC /bin/sh -c 'echo ~ && sleep 0' EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-tmp-1525440236.15-140334385587090 `" && echo ansible-tmp-1525440236.15-140334385587090="` echo /root/.ansible/tmp/ansible-tmp-1525440236.15-140334385587090 `" ) && sleep 0' PUT /tmp/tmpfOasSB TO /root/.ansible/tmp/ansible-tmp-1525440236.15-140334385587090/bigip_virtual_server.py EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1525440236.15-140334385587090/ /root/.ansible/tmp/ansible-tmp-1525440236.15-140334385587090/bigip_virtual_server.py && sleep 0' EXEC /bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-tmp-1525440236.15-140334385587090/bigip_virtual_server.py; rm -rf "/root/.ansible/tmp/ansible-tmp-1525440236.15-140334385587090/" > /dev/null 2>&1 && sleep 0' fatal: [xxx.com]: FAILED! => { "changed": false, "failed": true, "invocation": { "module_args": { "all_policies": null, "all_profiles": [ "tcp", "http" ], "all_rules": null, "default_persistence_profile": null, "description": null, "destination": "DEST_IP", "enabled_vlans": null, "fallback_persistence_profile": null, "name": "VS_NAME", "partition": "Common", "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "pool": "POOL_NAME", "port": "80", "route_advertisement_state": null, "server": "xxx.com", "server_port": 443, "snat": "Automap", "state": "present", "user": "admin", "validate_certs": false } }, "msg": "received exception: Error on updating Virtual Server : Error on setting snat : Method not found: 'LocalLB.VirtualServer.LocalLB.VirtualServerPort.get_source_address_translation_type'" }
Thanks for all your time to support this!
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com