You can either write a wrapper or use something like that:
https://github.com/stbenjam/puppet-hash_resources

Klaas Demter 

ATIX Informationstechnologie und Consulting AG 
Einsteinstraße 10 
85716 Unterschleißheim 
www.atix.de 


Registergericht: Amtsgericht München, Registernummer: HRB 168930 
USt.-Id.: DE209485962 
Vorstand: Thomas Merz (Vors.), Mark Hlawatschek 
Vorsitzender des Aufsichtsrats: Dr. Martin Buss 

----- Ursprüngliche Mail -----
Von: [email protected]
An: "Foreman users" <[email protected]>
Gesendet: Mittwoch, 24. August 2016 17:38:59
Betreff: [foreman-users] Firewalld - Adding multiple entries

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

-- 
You received this message because you are subscribed to the Google Groups 
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to