Hi jmp252!

I recently made the very same transition and banged my head against a wall 
for a while, but finally got it working, and perhaps this isn't the only 
solution or appropriate approach, but it's what's worked for me.  At a bare 
minimum, you should have "environmentpath = $confdir/environments" in 
puppet.conf (which it sounds like you already have), and the directory 
structure $confdir/environments/production/{manifests,modules}, as 
"production" is the default environment used for all hosts in 
Puppet/Foreman.  Of course, you can add environments in Foreman, and then 
you would just need a 
$confdir/environments/*<environment_name>*/{manifests,modules} 
directory structure for each additional one.  

Furthermore, I have an *environment.conf* file in each environment's 
directory (i.e /etc/puppet/environments/production/) that specifies a path 
for the manifests and modules, akin to the following, going along with the 
*production 
*example :

manifest = $confdir/environments/production/manifests
modulepath = $confdir/environments/production/modules

Of course, you will need a site.pp in each environment's "manifests" 
directory and at least one class in the "modules" directory that's being 
declared for a Puppet run to actually do anything.  Hopefully this helps, 
but feel free to let me know if you need any additional info or assistance!

## Example Structure ##
/etc/puppet/environments/production
/etc/puppet/environments/production/environment.conf
/etc/puppet/environments/production/manifests
/etc/puppet/environments/production/manifests/site.pp
/etc/puppet/environments/production/modules
/etc/puppet/environments/production/modules/ntp
/etc/puppet/environments/production/modules/ntp/{blah, blah, blah}

*BG*

On Wednesday, October 1, 2014 7:35:43 AM UTC-5, jmp242 wrote:
>
> Ok, I use TheForeman, and recently updated from puppet 3.4.3 to 3.7.1. I 
> also updated TheForeman to 1.6.0. I have had config file environments. One 
> wrinkle was I had modules as $confdir/environments/dev - and all the 
> modules are under here, no sub modules dir. I tried to migrate to directory 
> environments by moving my modules to $confdir/environments/dev/modules for 
> instance, and removing the config definitions in puppet.conf and adding 
> environmentpath=$confdir/environments to puppet.conf.I restarted apache, 
> but my clients could no longer find their modules. I've poured over the 
> docs, but can't see what I did wrong. Is there a doc with step by step 
> example of converting the type of environments to be puppet4 compatible?
>
>
> Because of TheForeman, I don't have anything in site.pp... But maybe I 
> need blank site.pp in each environment? Can Puppet work without a default 
> manifest? The docs imply it should process a blank one if one doesn't 
> exist... Do I have to have an environment.conf that specifies an empty 
> site.pp? It is really not clear from the docs.
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/148ec11a-02b8-4776-bc17-7d9c41d2bb70%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to