mirror of
https://github.com/ansible-collections/hetzner.hcloud.git
synced 2026-02-04 08:01:49 +00:00
refactor: no direct module access
This commit is contained in:
parent
07c1a497c6
commit
3b3990d8e0
2 changed files with 4 additions and 6 deletions
|
|
@ -338,8 +338,7 @@ class AnsibleFloatingIP(AnsibleHCloud):
|
|||
|
||||
|
||||
def main():
|
||||
module = AnsibleFloatingIP.define_module()
|
||||
o = AnsibleFloatingIP(module)
|
||||
o = AnsibleFloatingIP(AnsibleFloatingIP.define_module())
|
||||
|
||||
match o.module.params["state"]:
|
||||
case "absent":
|
||||
|
|
@ -350,7 +349,7 @@ def main():
|
|||
result = o.get_result()
|
||||
result["hcloud_floating_ip"] = result.pop(o.represent)
|
||||
|
||||
module.exit_json(**result)
|
||||
o.module.exit_json(**result)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
|||
|
|
@ -305,8 +305,7 @@ class AnsiblePrimaryIP(AnsibleHCloud):
|
|||
|
||||
|
||||
def main():
|
||||
module = AnsiblePrimaryIP.define_module()
|
||||
o = AnsiblePrimaryIP(module)
|
||||
o = AnsiblePrimaryIP(AnsiblePrimaryIP.define_module())
|
||||
|
||||
match o.module.params["state"]:
|
||||
case "absent":
|
||||
|
|
@ -317,7 +316,7 @@ def main():
|
|||
result = o.get_result()
|
||||
result["hcloud_primary_ip"] = result.pop(o.represent)
|
||||
|
||||
module.exit_json(**result)
|
||||
o.module.exit_json(**result)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue