I am trying to use the following module:
https://forge.puppet.com/crayfishx/firewalld
If in foreman, I edit Smart Class Parameter "ports" and enter key type
"yaml" with the following code:
firewalld_port:
ensure: present
zone: public
port: '161'
protocol: udp
it works and makes this addition to the firewall.
What I would like to be able to do, is add multiple entries. I have tried
a bunch of syntax, none working, but thought something like this would work:
firewalld_port:
ensure: present
zone: public
port: '161'
protocol: udp
firewalld_port:
ensure: present
zone: public
port: '80'
protocol: tcp
However, if I enter this, only the port 80 rule stays in the GUI and is
thus applied to my client.
Is there a correct syntax to apply multiple rules?
Also, if I understand Foreman correctly. I could have a host that is a
member of multiple Host Groups, and apply an override to each Host Group.
Therefore, if my host is a member of Host Groups "Web Server" and "SNMP
Client" it would get both Smart Class Parameter overides.
I have done this and when I view my host which is a member of both Host
Groups, click edit, then parameters, I only get one firewalld entry and not
two.
Is there a way to have a firewalld rule added based for each Host Group a
host might be in?
Thanks