mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
(cherry picked from commit 41bc7816f3
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
e77c5413c9
commit
370f5d8082
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:
|
||||
description:
|
||||
- The registration token is used to register new runners.
|
||||
required: True
|
||||
- Required if I(state) is C(present).
|
||||
type: str
|
||||
owned:
|
||||
description:
|
||||
|
@ -309,7 +309,7 @@ def main():
|
|||
locked=dict(type='bool', default=False),
|
||||
access_level=dict(type='str', default='ref_protected', choices=["not_protected", "ref_protected"]),
|
||||
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"]),
|
||||
))
|
||||
|
||||
|
@ -325,6 +325,9 @@ def main():
|
|||
required_one_of=[
|
||||
['api_username', 'api_token'],
|
||||
],
|
||||
required_if=[
|
||||
('state', 'present', ['registration_token']),
|
||||
],
|
||||
supports_check_mode=True,
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue