Sorry, I misread. I see what you're saying. This is like what I was proposing w/ hiera. The trouble is that it's not really R&P then as has been brought up by jcbollinger.
On Tuesday, November 5, 2019 at 5:27:33 PM UTC-7, Alan Evans wrote: > > Hey Karsten thank you for your thoughts. > > On Tuesday, November 5, 2019 at 1:52:12 AM UTC-7, Karsten Heymann wrote: >> >> Hi Alan, >> >> I would simply do >> >> class profile::base { include profile::wazuh } >> >> class profile::wazuh ( >> Boolean $manager = False >> ) { >> if $manager { >> include profile::wazuh::manager >> } >> else { >> include profiles::wazuh::agent >> } >> >> and be set with it. >> >> Then you don't need the following: >> class role::wazuh::manager { include profile::wazuh::manager } >> because every node already includes profile::wazuh via profile::base >> > > The trouble here is that the way the module works is that a node can only > be a wazuh::agent or wazuh::manager. If a node had both it would have > duplicate resource definitions. For example File{'/var/ossec/ossec.conf':} > is used by both the agent and the manager but they're different. > > I think I mentioned this in a paragraph I edited out of my original email. > > >> Best >> Karsten >> > -- 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/2884be7e-cc1e-4ffd-a8f0-9963700ca4d5%40googlegroups.com.