Hi Felix,

I'm aware there are no functions in the example, which would be implemented
either as a `define` in Puppet or as a custom type in Ruby - I was just
expressing that I'm open to any solution, which may involve some helper
function under the hood.

At the moment I'm using an existing module called firewalld which expects
you to pass the services in to the zone declaration, avoiding the need to
share data between types/defines. But this requires you to know the zone
definition and the services at the same time. It only really needs to
generate this XML and possibly notify the service on any changes, so
certainly achievable through the concat module.

The resulting work.xml file would look roughly like this

<zone>
  <source address="10.0.0.0/16" />
  <service name="elasticsearch" />
</zone>

I suspect that the reason the concat module exists is because this isn't
possible any other way, without nasty hackery.

Having written all this, I've learned that the `firewall-cmd` frontend to
firewalld can be used to manipulate these files, so a solution might be to
write a provider that drives this command rather than manage the files
directly.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAJYogSR3piJQPv%3Dx3qY_oTARdw3oBWBRgRvwFwDsPwFz5guOLA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to