I'm using Foreman (1.4) and Puppet (3.4.3). I just started using Foreman and Puppet like 4 weeks ago, so I'm new.
What I want to do is set a default path for exec resources. According to many howtos this is not a problem if you are using Puppet without Foreman, since you can put it in your site.pp
.
My site.pp
read as follows:
# Empty site.pp required (puppet #15106, foreman #1708)
I have tried some things like putting it in a class and
- Include the class in any class I use with exec resources
- Include the class in the topmost host group
- Include the class in the host (explicit)
Nothing worked.
What worked was putting the definition in the class where I want to use some exec resources, but that is basically the same as defining the path for every exec.
Furthermore this applies also to file resources, which should have a default ignore, like ignore => '.svn'
So my question is, is there a way to do things like that with Foreman? I would love to solve this with Foreman and Puppet "as is".
As we discussed in the comments. Simply put your
Exec
defaults into your site.pp.Any empty site.pp is created by Foreman is created because it must exist, or else there are errors. The file is only created if it doesn't exist. The contents of the file is not otherwise modified.
https://github.com/theforeman/puppet-puppet/blob/master/manifests/server/config.pp