From a87c82d808e484b5fcebb6886ce830b2822923b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20K=C3=A4mmerling?= Date: Mon, 7 Nov 2022 13:58:43 +0100 Subject: [PATCH] hcloud_firewall: Add support for esp and gre (#161) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lukas Kämmerling Signed-off-by: Lukas Kämmerling --- changelogs/fragments/hcloud_firewall-esp-gre.yml | 2 ++ plugins/modules/hcloud_firewall.py | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/hcloud_firewall-esp-gre.yml diff --git a/changelogs/fragments/hcloud_firewall-esp-gre.yml b/changelogs/fragments/hcloud_firewall-esp-gre.yml new file mode 100644 index 0000000..0e34016 --- /dev/null +++ b/changelogs/fragments/hcloud_firewall-esp-gre.yml @@ -0,0 +1,2 @@ +minor_changes: + - hcloud_firewall - add support for esp and gre protocols diff --git a/plugins/modules/hcloud_firewall.py b/plugins/modules/hcloud_firewall.py index 61bc88a..a979e29 100644 --- a/plugins/modules/hcloud_firewall.py +++ b/plugins/modules/hcloud_firewall.py @@ -55,17 +55,19 @@ options: description: - The protocol of the firewall rule. type: str - choices: [ icmp, tcp, udp ] + choices: [ icmp, tcp, udp, esp, gre ] source_ips: description: - List of CIDRs that are allowed within this rule type: list elements: str + default: [ ] destination_ips: description: - List of CIDRs that are allowed within this rule type: list elements: str + default: [ ] description: description: - User defined description of this rule. @@ -306,7 +308,7 @@ class AnsibleHcloudFirewall(Hcloud): elements="dict", options=dict( direction={"type": "str", "choices": ["in", "out"]}, - protocol={"type": "str", "choices": ["icmp", "udp", "tcp"]}, + protocol={"type": "str", "choices": ["icmp", "udp", "tcp", "esp", "gre"]}, port={"type": "str"}, source_ips={"type": "list", "elements": "str", "default": []}, destination_ips={"type": "list", "elements": "str", "default": []},