[PR #7878/29f98654 backport][stable-8] Add new consul modules and reuse code between them. (#7902)

Add new consul modules and reuse code between them. (#7878)

Refactored consul modules and added new roles.

(cherry picked from commit 29f9865497)

Co-authored-by: Florian Apolloner <florian@apolloner.eu>
This commit is contained in:
patchback[bot] 2024-01-27 10:33:33 +01:00 committed by GitHub
parent 1ee2bba140
commit 0a904d60cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 1508 additions and 568 deletions

View file

@ -21,6 +21,7 @@ author:
- Håkon Lerring (@Hakon)
extends_documentation_fragment:
- community.general.consul
- community.general.consul.token
- community.general.attributes
attributes:
check_mode:
@ -124,7 +125,7 @@ EXAMPLES = '''
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.community.general.plugins.module_utils.consul import (
auth_argument_spec, _ConsulModule
AUTH_ARGUMENTS_SPEC, _ConsulModule
)
@ -281,7 +282,7 @@ def main():
'node',
'present']),
datacenter=dict(type='str'),
**auth_argument_spec()
**AUTH_ARGUMENTS_SPEC
)
module = AnsibleModule(