thbe / puppet-ssmtp

Puppet ssmtp module
https://thbe.github.io/puppet-ssmtp/
GNU General Public License v3.0
1 stars 15 forks source link

puppetmaster variable should be removed from templates #2

Closed cbarbour closed 10 years ago

cbarbour commented 10 years ago

Hi Thbe,

I'd advise removing this line from your templates:

# Managed: Puppet <%= puppetversion %> on <%= puppetmaster %>

Consider replacing it with:

# Managed by Puppet

There are a couple of reasons for this recommendation:

  1. The puppetmaster variable is only set when running with a master. This variable dependency breaks the module when applied using standalone puppet. http://docs.puppetlabs.com/puppet/2.7/reference/lang_variables.html#master-set-variables
  2. If you use a cluster of Puppetmasters, this will create unnecessary configuration churn. There will be lots lots of change reports, and lots of filebucket entries.
  3. It's pretty trivial to determine the Puppet master and puppet version from the client using the puppet agent --configprint option.
MasonM commented 10 years ago

Funny, we both ran into this issue at the same time. I entered PR #3 to fix it, and my solution was to wrap puppetmaster in an "if" block. That doesn't solve the problem of configuration churn for people that use puppetmaster clusters, so removing it entirely is probably better.

cbarbour commented 10 years ago

Nice timing. :)

I'd advise removing the version number for the same reason.

cbarbour commented 10 years ago

I've created a pull request that resolves this issue and bumps the module version number. I based it on MaonM's request just to make the integration process easier.