gitlab_instance_variable: Add support for 'raw' property (#9425)
* gitlab_instance_variable: Add support for 'raw' property * Changelog fragment * Add missing punctuation Co-authored-by: Felix Fontein <felix@fontein.de> * Add version_added Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de>pull/9486/head
parent
403418f75d
commit
f8bfd5df0d
|
@ -0,0 +1,2 @@
|
||||||
|
minor_changes:
|
||||||
|
- gitlab_instance_variable - add support for ``raw`` variables suboption (https://github.com/ansible-collections/community.general/pull/9425).
|
|
@ -74,6 +74,13 @@ options:
|
||||||
- Whether variable value is protected or not.
|
- Whether variable value is protected or not.
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
|
raw:
|
||||||
|
description:
|
||||||
|
- Whether variable value is raw or not.
|
||||||
|
- Support for raw values requires GitLab >= 15.7.
|
||||||
|
type: bool
|
||||||
|
default: false
|
||||||
|
version_added: 10.2.0
|
||||||
variable_type:
|
variable_type:
|
||||||
description:
|
description:
|
||||||
- Whether a variable is an environment variable (V(env_var)) or a file (V(file)).
|
- Whether a variable is an environment variable (V(env_var)) or a file (V(file)).
|
||||||
|
@ -160,6 +167,7 @@ class GitlabInstanceVariables(object):
|
||||||
"value": var_obj.get('value'),
|
"value": var_obj.get('value'),
|
||||||
"masked": var_obj.get('masked'),
|
"masked": var_obj.get('masked'),
|
||||||
"protected": var_obj.get('protected'),
|
"protected": var_obj.get('protected'),
|
||||||
|
"raw": var_obj.get('raw'),
|
||||||
"variable_type": var_obj.get('variable_type'),
|
"variable_type": var_obj.get('variable_type'),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -227,6 +235,8 @@ def native_python_main(this_gitlab, purge, requested_variables, state, module):
|
||||||
item['protected'] = False
|
item['protected'] = False
|
||||||
if item.get('masked') is None:
|
if item.get('masked') is None:
|
||||||
item['masked'] = False
|
item['masked'] = False
|
||||||
|
if item.get('raw') is None:
|
||||||
|
item['raw'] = False
|
||||||
if item.get('variable_type') is None:
|
if item.get('variable_type') is None:
|
||||||
item['variable_type'] = 'env_var'
|
item['variable_type'] = 'env_var'
|
||||||
|
|
||||||
|
@ -297,6 +307,7 @@ def main():
|
||||||
value=dict(type='str', no_log=True),
|
value=dict(type='str', no_log=True),
|
||||||
masked=dict(type='bool', default=False),
|
masked=dict(type='bool', default=False),
|
||||||
protected=dict(type='bool', default=False),
|
protected=dict(type='bool', default=False),
|
||||||
|
raw=dict(type='bool', default=False),
|
||||||
variable_type=dict(type='str', default='env_var', choices=["env_var", "file"])
|
variable_type=dict(type='str', default='env_var', choices=["env_var", "file"])
|
||||||
)),
|
)),
|
||||||
state=dict(type='str', default="present", choices=["absent", "present"]),
|
state=dict(type='str', default="present", choices=["absent", "present"]),
|
||||||
|
|
Loading…
Reference in New Issue