hetzner.hcloud.hcloud_firewall – Create and manage firewalls on the Hetzner Cloud.¶
Note
This plugin is part of the hetzner.hcloud collection (version 1.4.2).
To install it use: ansible-galaxy collection install hetzner.hcloud
.
To use it in a playbook, specify: hetzner.hcloud.hcloud_firewall
.
Requirements¶
The below requirements are needed on the host that executes this module.
hcloud-python >= 1.0.0
Parameters¶
See Also¶
See also
- Documentation for Hetzner Cloud API
Complete reference for the Hetzner Cloud API.
Examples¶
- name: Create a basic firewall
hcloud_firewall:
name: my-firewall
state: present
- name: Create a firewall with rules
hcloud_firewall:
name: my-firewall
rules:
- direction: in
protocol: icmp
source_ips:
- 0.0.0.0/0
- ::/0
state: present
- name: Create a firewall with labels
hcloud_firewall:
name: my-firewall
labels:
key: value
mylabel: 123
state: present
- name: Ensure the firewall is absent (remove if needed)
hcloud_firewall:
name: my-firewall
state: absent
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Lukas Kaemmerling (@lkaemmerling)