How to set the comment field for the firewalls using ansible?
onnimonni opened this issue · 2 comments
onnimonni commented
elnygren commented
The API client and the API both support the "comment" attribute discussed here:
https://www.upcloud.com/api/11-firewall/
The ansible module passes everything you give it on to the API client (see https://github.com/UpCloudLtd/upcloud-ansible/blob/master/modules/upcloud_firewall.py#L237) so in theory, that feature should work with:
- name: configure firewall
upcloud_firewall:
state: present
hostname: www13.example.com
firewall_rules:
- direction: in,
family: IPv4,
protocol: tcp,
source_address_start: 192.168.1.1,
source_address_end: 192.168.1.255,
destination_port_start: 22,
destination_port_end: 22,
action: reject,
comment: lorem ipsum foobar
hope that helps !
onnimonni commented
Thanks! This works just fine :)