diff --git a/lib/ansible/modules/extras/clustering/consul.py b/lib/ansible/modules/extras/clustering/consul.py index 27c3e84260..a5e4a5140d 100644 --- a/lib/ansible/modules/extras/clustering/consul.py +++ b/lib/ansible/modules/extras/clustering/consul.py @@ -95,10 +95,12 @@ options: required: false service_address: description: - - the address on which the service is serving required for - registration of a service + - the address to advertise that the service will be listening on. + This value will be passed as the I(Address) parameter to Consul's + U(/v1/agent/service/register) API method, so refer to the Consul API + documentation for further details. required: false - default: localhost + default: None version_added: "2.1" tags: description: @@ -185,11 +187,11 @@ EXAMPLES = ''' interval: 60s http: /status - - name: register nginx with address + - name: register external service nginx available at 10.1.5.23 consul: service_name: nginx service_port: 80 - service_address: 127.0.0.1 + service_address: 10.1.5.23 - name: register nginx with some service tags consul: @@ -542,7 +544,7 @@ def main(): script=dict(required=False), service_id=dict(required=False), service_name=dict(required=False), - service_address=dict(required=False, type='str', default='localhost'), + service_address=dict(required=False, type='str', default=None), service_port=dict(required=False, type='int'), state=dict(default='present', choices=['present', 'absent']), interval=dict(required=False, type='str'),