1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-16 17:01:30 +00:00

Reformat everything.

This commit is contained in:
Felix Fontein 2025-11-01 12:08:41 +01:00
parent 3f2213791a
commit 340ff8586d
1008 changed files with 61301 additions and 58309 deletions

View file

@ -161,31 +161,31 @@ from ansible_collections.community.general.plugins.module_utils.consul import (
_ARGUMENT_SPEC = {
"state": dict(default="present", choices=["present", "absent"]),
"name": dict(type='str'),
"id": dict(type='str'),
"interval": dict(type='str'),
"notes": dict(type='str'),
"args": dict(type='list', elements='str'),
"http": dict(type='str'),
"tcp": dict(type='str'),
"ttl": dict(type='str'),
"timeout": dict(type='str'),
"service_id": dict(type='str'),
"name": dict(type="str"),
"id": dict(type="str"),
"interval": dict(type="str"),
"notes": dict(type="str"),
"args": dict(type="list", elements="str"),
"http": dict(type="str"),
"tcp": dict(type="str"),
"ttl": dict(type="str"),
"timeout": dict(type="str"),
"service_id": dict(type="str"),
}
_MUTUALLY_EXCLUSIVE = [
('args', 'ttl', 'tcp', 'http'),
("args", "ttl", "tcp", "http"),
]
_REQUIRED_IF = [
('state', 'present', ['name']),
('state', 'absent', ('id', 'name'), True),
("state", "present", ["name"]),
("state", "absent", ("id", "name"), True),
]
_REQUIRED_BY = {
'args': 'interval',
'http': 'interval',
'tcp': 'interval',
"args": "interval",
"http": "interval",
"tcp": "interval",
}
_ARGUMENT_SPEC.update(AUTH_ARGUMENTS_SPEC)
@ -195,8 +195,17 @@ class ConsulAgentCheckModule(_ConsulModule):
api_endpoint = "agent/check"
result_key = "check"
unique_identifiers = ["id", "name"]
operational_attributes = {"Node", "CheckID", "Output", "ServiceName", "ServiceTags",
"Status", "Type", "ExposedPort", "Definition"}
operational_attributes = {
"Node",
"CheckID",
"Output",
"ServiceName",
"ServiceTags",
"Status",
"Type",
"ExposedPort",
"Definition",
}
def endpoint_url(self, operation, identifier=None):
if operation == OPERATION_READ: