mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 06:10:22 -07:00
consul: Always fail if no service_name was provided. (#25877)
Fixes a subtile bug introduced in PR #21737
This commit is contained in:
parent
754ef34acb
commit
bf73377394
2 changed files with 13 additions and 2 deletions
|
@ -389,8 +389,8 @@ def parse_service(module):
|
|||
module.params.get('service_port'),
|
||||
module.params.get('tags'),
|
||||
)
|
||||
elif module.params.get('service_port') and not module.params.get('service_name'):
|
||||
module.fail_json(msg="service_port supplied but no service_name, a name is required to configure a service.")
|
||||
elif not module.params.get('service_name'):
|
||||
module.fail_json(msg="service_name is required to configure a service.")
|
||||
|
||||
|
||||
class ConsulService():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue