mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
[Scaleway] Remove unused sensitive values filtering (#5497)
* [Scaleway] Remove unused sensitive values filtering Signed-off-by: Lunik <lunik@tiwabbit.fr> * Try adding function back. Maybe that works aound the bug in pylint. (Also it won't be a breaking change anymore.) Signed-off-by: Lunik <lunik@tiwabbit.fr> Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
b696aa72b2
commit
bc7e7f8fcb
3 changed files with 12 additions and 23 deletions
|
@ -74,20 +74,17 @@ container_namespace:
|
|||
region: fr-par
|
||||
registry_endpoint: ""
|
||||
registry_namespace_id: ""
|
||||
secret_environment_variables: SENSITIVE_VALUE
|
||||
secret_environment_variables:
|
||||
- key: MY_SECRET_VAR
|
||||
value: $argon2id$v=19$m=65536,t=1,p=2$tb6UwSPWx/rH5Vyxt9Ujfw$5ZlvaIjWwNDPxD9Rdght3NarJz4IETKjpvAU3mMSmFg
|
||||
status: pending
|
||||
'''
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.scaleway import (
|
||||
SCALEWAY_ENDPOINT, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway,
|
||||
filter_sensitive_attributes
|
||||
SCALEWAY_ENDPOINT, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway
|
||||
)
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
SENSITIVE_ATTRIBUTES = (
|
||||
"secret_environment_variables",
|
||||
)
|
||||
|
||||
|
||||
def info_strategy(api, wished_cn):
|
||||
cn_list = api.fetch_all_resources("namespaces")
|
||||
|
@ -124,7 +121,7 @@ def core(module):
|
|||
|
||||
summary = info_strategy(api=api, wished_cn=wished_container_namespace)
|
||||
|
||||
module.exit_json(changed=False, container_namespace=filter_sensitive_attributes(summary, SENSITIVE_ATTRIBUTES))
|
||||
module.exit_json(changed=False, container_namespace=summary)
|
||||
|
||||
|
||||
def main():
|
||||
|
|
|
@ -80,15 +80,10 @@ container_registry:
|
|||
'''
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.scaleway import (
|
||||
SCALEWAY_ENDPOINT, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway,
|
||||
filter_sensitive_attributes
|
||||
SCALEWAY_ENDPOINT, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway
|
||||
)
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
SENSITIVE_ATTRIBUTES = (
|
||||
"secret_environment_variables",
|
||||
)
|
||||
|
||||
|
||||
def info_strategy(api, wished_cn):
|
||||
cn_list = api.fetch_all_resources("namespaces")
|
||||
|
@ -125,7 +120,7 @@ def core(module):
|
|||
|
||||
summary = info_strategy(api=api, wished_cn=wished_container_namespace)
|
||||
|
||||
module.exit_json(changed=False, container_registry=filter_sensitive_attributes(summary, SENSITIVE_ATTRIBUTES))
|
||||
module.exit_json(changed=False, container_registry=summary)
|
||||
|
||||
|
||||
def main():
|
||||
|
|
|
@ -81,21 +81,18 @@ function:
|
|||
region: fr-par
|
||||
runtime: python310
|
||||
runtime_message: ""
|
||||
secret_environment_variables: SENSITIVE_VALUE
|
||||
secret_environment_variables:
|
||||
- key: MY_SECRET_VAR
|
||||
value: $argon2id$v=19$m=65536,t=1,p=2$tb6UwSPWx/rH5Vyxt9Ujfw$5ZlvaIjWwNDPxD9Rdght3NarJz4IETKjpvAU3mMSmFg
|
||||
status: created
|
||||
timeout: 300s
|
||||
'''
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.scaleway import (
|
||||
SCALEWAY_ENDPOINT, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway,
|
||||
filter_sensitive_attributes
|
||||
SCALEWAY_ENDPOINT, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway
|
||||
)
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
SENSITIVE_ATTRIBUTES = (
|
||||
"secret_environment_variables",
|
||||
)
|
||||
|
||||
|
||||
def info_strategy(api, wished_fn):
|
||||
fn_list = api.fetch_all_resources("functions")
|
||||
|
@ -132,7 +129,7 @@ def core(module):
|
|||
|
||||
summary = info_strategy(api=api, wished_fn=wished_function)
|
||||
|
||||
module.exit_json(changed=False, function=filter_sensitive_attributes(summary, SENSITIVE_ATTRIBUTES))
|
||||
module.exit_json(changed=False, function=summary)
|
||||
|
||||
|
||||
def main():
|
||||
|
|
Loading…
Reference in a new issue