On Saturday, February 1, 2014 3:06:37 AM UTC-6, Jose Luis Ledesma wrote: > > I think there are two options. > 1. Make use if hiera. If you don't have a lot of zimbra servers could be > the best option, but you should maintain this manually. > 2. A custom fact that reports if the server has zimbra or not. >
Indeed, there are two options. One is to use a custom fact to report whether the target machine has Zimbra configured, as Jose suggests. This is the way to go if Zimbra is outside the scope of what you want to manage via Puppet. The other option is to teach the Puppet master whether the target node is *supposed* to have Zimbra. If you are already managing the Zimbra configuration via Puppet then the master already has that information, at some level. You need to make that information available at the point in your manifests where you declare the properties of the postfix service, and one way to do that -- by no means the only one -- would be to pull it up into an Hiera data store. Either way, given information about whether the target node has or should have Zimbra, you can declare postfix appropriately. For example, service { 'postfix': enable => ! $zimbra_node, ensure => $zimbra_node ? { true => 'stopped', default => 'running' } } John -- 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/2c0fb7ad-b296-465f-9fbf-605342816770%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.