mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Implemented fix pointed in issue (#1760)
This commit is contained in:
parent
865acdd4cf
commit
41bc7816f3
2 changed files with 7 additions and 2 deletions
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- gitlab_runner - parameter ``registration_token`` was required but is used only when ``state`` is ``present`` (https://github.com/ansible-collections/community.general/issues/1714).
|
|
@ -55,7 +55,7 @@ options:
|
||||||
registration_token:
|
registration_token:
|
||||||
description:
|
description:
|
||||||
- The registration token is used to register new runners.
|
- The registration token is used to register new runners.
|
||||||
required: True
|
- Required if I(state) is C(present).
|
||||||
type: str
|
type: str
|
||||||
owned:
|
owned:
|
||||||
description:
|
description:
|
||||||
|
@ -309,7 +309,7 @@ def main():
|
||||||
locked=dict(type='bool', default=False),
|
locked=dict(type='bool', default=False),
|
||||||
access_level=dict(type='str', default='ref_protected', choices=["not_protected", "ref_protected"]),
|
access_level=dict(type='str', default='ref_protected', choices=["not_protected", "ref_protected"]),
|
||||||
maximum_timeout=dict(type='int', default=3600),
|
maximum_timeout=dict(type='int', default=3600),
|
||||||
registration_token=dict(type='str', required=True, no_log=True),
|
registration_token=dict(type='str', no_log=True),
|
||||||
state=dict(type='str', default="present", choices=["absent", "present"]),
|
state=dict(type='str', default="present", choices=["absent", "present"]),
|
||||||
))
|
))
|
||||||
|
|
||||||
|
@ -325,6 +325,9 @@ def main():
|
||||||
required_one_of=[
|
required_one_of=[
|
||||||
['api_username', 'api_token'],
|
['api_username', 'api_token'],
|
||||||
],
|
],
|
||||||
|
required_if=[
|
||||||
|
('state', 'present', ['registration_token']),
|
||||||
|
],
|
||||||
supports_check_mode=True,
|
supports_check_mode=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue