Update examples in the documentation to yaml syntax

This commit is contained in:
Toshio Kuratomi 2016-07-27 15:47:25 -07:00
parent 39f36103d7
commit c6938e42ef

View file

@ -83,16 +83,26 @@ options:
EXAMPLES = ''' EXAMPLES = '''
# Adds or modify the backend '212.1.1.1' to a # Adds or modify the backend '212.1.1.1' to a
# loadbalancing 'ip-1.1.1.1' # loadbalancing 'ip-1.1.1.1'
- ovh_ip_loadbalancing name=ip-1.1.1.1 backend=212.1.1.1 - ovh_ip_loadbalancing:
state=present probe=none weight=8 name: ip-1.1.1.1
endpoint=ovh-eu application_key=yourkey backend: 212.1.1.1
application_secret=yoursecret consumer_key=yourconsumerkey state: present
probe: none
weight: 8
endpoint: ovh-eu
application_key: yourkey
application_secret: yoursecret
consumer_key: yourconsumerkey
# Removes a backend '212.1.1.1' from a loadbalancing # Removes a backend '212.1.1.1' from a loadbalancing 'ip-1.1.1.1'
# 'ip-1.1.1.1' - ovh_ip_loadbalancing:
- ovh_ip_loadbalancing name=ip-1.1.1.1 backend=212.1.1.1 name: ip-1.1.1.1
state=absent endpoint=ovh-eu application_key=yourkey backend: 212.1.1.1
application_secret=yoursecret consumer_key=yourconsumerkey state: absent
endpoint: ovh-eu
application_key: yourkey
application_secret: yoursecret
consumer_key: yourconsumerkey
''' '''
RETURN = ''' RETURN = '''
@ -295,9 +305,6 @@ def main():
module.exit_json(changed=moduleChanged) module.exit_json(changed=moduleChanged)
# We should never reach here
module.fail_json(msg='Internal ovh_ip_loadbalancing_backend module error')
# import module snippets # import module snippets
from ansible.module_utils.basic import * from ansible.module_utils.basic import *