From f8d396e659a3804c1ce4cb41d4e3706040fea753 Mon Sep 17 00:00:00 2001 From: jo Date: Tue, 19 Sep 2023 09:16:08 +0200 Subject: [PATCH] wip --- plugins/modules/hcloud_firewall.py | 78 ++++++++++++------------- plugins/modules/hcloud_firewall_info.py | 5 +- 2 files changed, 42 insertions(+), 41 deletions(-) diff --git a/plugins/modules/hcloud_firewall.py b/plugins/modules/hcloud_firewall.py index e3d4ccdf..9b22be5c 100644 --- a/plugins/modules/hcloud_firewall.py +++ b/plugins/modules/hcloud_firewall.py @@ -69,45 +69,7 @@ applied_to: description: - Resources the Firewall should be applied to. - - This will remove any additional resource and apply the missing resource. - type: list - elements: dict - suboptions: - type: - description: - - Type of the resource. - type: str - choices: [server, label_selector] - label_selector: - description: - - Label selector value, required if I(type) is `label_selector`. - type: str - server: - description: - - ID or name of the server, required if I(type) is `server`. - type: str - apply_to: - description: - - Resources the Firewall should be applied to. - type: list - elements: dict - suboptions: - type: - description: - - Type of the resource. - type: str - choices: [server, label_selector] - label_selector: - description: - - Label selector value, required if I(type) is `label_selector`. - type: str - server: - description: - - ID or name of the server, required if I(type) is `server`. - type: str - remove_from: - description: - - Resources the Firewall should be removed from. + - This will remove any additional resource and apply the missing resource. type: list elements: dict suboptions: @@ -124,6 +86,44 @@ description: - ID or name of the server, required if I(type) is `server`. type: str + # apply_to: + # description: + # - Resources the Firewall should be applied to. + # type: list + # elements: dict + # suboptions: + # type: + # description: + # - Type of the resource. + # type: str + # choices: [server, label_selector] + # label_selector: + # description: + # - Label selector value, required if I(type) is `label_selector`. + # type: str + # server: + # description: + # - ID or name of the server, required if I(type) is `server`. + # type: str + # remove_from: + # description: + # - Resources the Firewall should be removed from. + # type: list + # elements: dict + # suboptions: + # type: + # description: + # - Type of the resource. + # type: str + # choices: [server, label_selector] + # label_selector: + # description: + # - Label selector value, required if I(type) is `label_selector`. + # type: str + # server: + # description: + # - ID or name of the server, required if I(type) is `server`. + # type: str state: description: - State of the firewall. diff --git a/plugins/modules/hcloud_firewall_info.py b/plugins/modules/hcloud_firewall_info.py index 35e63180..25d52e1c 100644 --- a/plugins/modules/hcloud_firewall_info.py +++ b/plugins/modules/hcloud_firewall_info.py @@ -44,7 +44,7 @@ var: output - + """ RETURN = """ @@ -140,7 +140,8 @@ type: int sample: 12345 """ -from typing import Dict, Any, List +from typing import Any, Dict, List + from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.common.text.converters import to_native