|
|
@ -128,6 +128,9 @@ EXAMPLES = '''
|
|
|
|
|
|
|
|
|
|
|
|
import sys
|
|
|
|
import sys
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
USER_AGENT_PRODUCT="Ansible-gce_lb"
|
|
|
|
|
|
|
|
USER_AGENT_VERSION="v1beta15"
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
from libcloud.compute.types import Provider
|
|
|
|
from libcloud.compute.types import Provider
|
|
|
|
from libcloud.compute.providers import get_driver
|
|
|
|
from libcloud.compute.providers import get_driver
|
|
|
@ -202,7 +205,11 @@ def main():
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
gce = get_driver(Provider.GCE)(*ARGS, **KWARGS)
|
|
|
|
gce = get_driver(Provider.GCE)(*ARGS, **KWARGS)
|
|
|
|
|
|
|
|
gce.connection.user_agent_append("%s/%s" % (
|
|
|
|
|
|
|
|
USER_AGENT_PRODUCT, USER_AGENT_VERSION))
|
|
|
|
gcelb = get_driver_lb(Provider_lb.GCE)(gce_driver=gce)
|
|
|
|
gcelb = get_driver_lb(Provider_lb.GCE)(gce_driver=gce)
|
|
|
|
|
|
|
|
gcelb.connection.user_agent_append("%s/%s" % (
|
|
|
|
|
|
|
|
USER_AGENT_PRODUCT, USER_AGENT_VERSION))
|
|
|
|
except Exception as e:
|
|
|
|
except Exception as e:
|
|
|
|
module.fail_json(msg=unexpected_error_msg(e), changed=False)
|
|
|
|
module.fail_json(msg=unexpected_error_msg(e), changed=False)
|
|
|
|
|
|
|
|
|
|
|
|