Fix default service_address in consul module (#2454)

PR #1299 introduced the service_address parameter but specified a
default value of localhost. This is a breaking change; prior to that,
the consul module would always assume that the service should advertise
the address that the Consul agent was listening on. With this change,
the consul module will now default to advertising localhost to all nodes
for the service, which isn't the desired behavior. This changes the
default back to None which is the implicit default prior to #1299.
pull/18777/head
Joel Thompson 9 years ago committed by Matt Clay
parent e235f88a91
commit be695eda69

@ -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'),

Loading…
Cancel
Save