mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
Reformat everything.
This commit is contained in:
@@ -92,7 +92,9 @@ container:
|
||||
"""
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.scaleway import (
|
||||
SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway,
|
||||
SCALEWAY_REGIONS,
|
||||
scaleway_argument_spec,
|
||||
Scaleway,
|
||||
)
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
@@ -118,10 +120,7 @@ def info_strategy(api, wished_cn):
|
||||
|
||||
def core(module):
|
||||
region = module.params["region"]
|
||||
wished_container = {
|
||||
"namespace_id": module.params["namespace_id"],
|
||||
"name": module.params["name"]
|
||||
}
|
||||
wished_container = {"namespace_id": module.params["namespace_id"], "name": module.params["name"]}
|
||||
|
||||
api = Scaleway(module=module)
|
||||
api.api_path = f"containers/v1beta1/regions/{region}/containers"
|
||||
@@ -133,11 +132,13 @@ def core(module):
|
||||
|
||||
def main():
|
||||
argument_spec = scaleway_argument_spec()
|
||||
argument_spec.update(dict(
|
||||
namespace_id=dict(type='str', required=True),
|
||||
region=dict(type='str', required=True, choices=SCALEWAY_REGIONS),
|
||||
name=dict(type='str', required=True)
|
||||
))
|
||||
argument_spec.update(
|
||||
dict(
|
||||
namespace_id=dict(type="str", required=True),
|
||||
region=dict(type="str", required=True, choices=SCALEWAY_REGIONS),
|
||||
name=dict(type="str", required=True),
|
||||
)
|
||||
)
|
||||
module = AnsibleModule(
|
||||
argument_spec=argument_spec,
|
||||
supports_check_mode=True,
|
||||
@@ -146,5 +147,5 @@ def main():
|
||||
core(module)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user