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!