Manifestdir ignored when importing classes from puppet

I run "rake puppet:import:puppet_classes RAILS_ENV=production" and it
imports all my classes from my module path just fine. However, it
misses everything in the manifestdir I have set for each environment
in my puppet.conf.

I found that the stuff in "app/models/environment.rb" is what does the
work and it only pulls classes from the modulepath. Any way it could
also pull from the manifestdir? Thanks.

-eric

You can force the modulepath to be your manifest dir by using the modulepath
setting in the config/settings.yaml file, i.e.
:modulepath: /etc/puppet/manifests

note that this will not work for importing the rest of your modules…

Ohad

··· On Fri, Nov 5, 2010 at 5:39 PM, Eric Snow wrote:

I run “rake puppet:import:puppet_classes RAILS_ENV=production” and it
imports all my classes from my module path just fine. However, it
misses everything in the manifestdir I have set for each environment
in my puppet.conf.

I found that the stuff in “app/models/environment.rb” is what does the
work and it only pulls classes from the modulepath. Any way it could
also pull from the manifestdir? Thanks.

-eric


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.comforeman-users%2Bunsubscribe@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.

Thanks for the quick response. That will work for a quick fix, but it
would be great if "app/models/environment.rb" handled both.
Unfortunately I don't know ruby (nor have the time), or I would get
you a patch to do it. In the meantime I can just flipflop that
modulepath setting to pull in both. Thanks again.

-eric

··· On Nov 5, 12:22 pm, Ohad Levy wrote: > You can force the modulepath to be your manifest dir by using the modulepath > setting in the config/settings.yaml file, i.e. > :modulepath: /etc/puppet/manifests > > note that this will not work for importing the rest of your modules.. > > Ohad > > On Fri, Nov 5, 2010 at 5:39 PM, Eric Snow wrote: > > > > > > > > > I run "rake puppet:import:puppet_classes RAILS_ENV=production" and it > > imports all my classes from my module path just fine. However, it > > misses everything in the manifestdir I have set for each environment > > in my puppet.conf. > > > I found that the stuff in "app/models/environment.rb" is what does the > > work and it only pulls classes from the modulepath. Any way it could > > also pull from the manifestdir? Thanks. > > > -eric > > > -- > > You received this message because you are subscribed to the Google Groups > > "Foreman users" group. > > To post to this group, send email to foreman-users@googlegroups.com. > > To unsubscribe from this group, send email to > > foreman-users+unsubscribe@googlegroups.com > > . > > For more options, visit this group at > >http://groups.google.com/group/foreman-users?hl=en.

Does that still require that my manifests be in module format (with a
manifests directory in each module) or does it respect the manifests
at the top level of my manifests directory. I ask because I added
that setting with the path to my manifests directory and it did not
add the classes that are there. Thanks.

-eric

··· On Nov 5, 12:22 pm, Ohad Levy wrote: > You can force the modulepath to be your manifest dir by using the modulepath > setting in the config/settings.yaml file, i.e. > :modulepath: /etc/puppet/manifests > > note that this will not work for importing the rest of your modules.. > > Ohad > > On Fri, Nov 5, 2010 at 5:39 PM, Eric Snow wrote: > > > > > > > > > I run "rake puppet:import:puppet_classes RAILS_ENV=production" and it > > imports all my classes from my module path just fine. However, it > > misses everything in the manifestdir I have set for each environment > > in my puppet.conf. > > > I found that the stuff in "app/models/environment.rb" is what does the > > work and it only pulls classes from the modulepath. Any way it could > > also pull from the manifestdir? Thanks. > > > -eric > > > -- > > You received this message because you are subscribed to the Google Groups > > "Foreman users" group. > > To post to this group, send email to foreman-users@googlegroups.com. > > To unsubscribe from this group, send email to > > foreman-users+unsubscribe@googlegroups.com > > . > > For more options, visit this group at > >http://groups.google.com/group/foreman-users?hl=en.

Yeah, looking at the code again, (app/models/puppetclass.rb) you could see
that it tries to find the module/manifests directory.
you could either change that, or temp copy your manifests into one of the
modules as a hacl :frowning:

alternatively, if you dont have many classes there (which I hope you dont),
you could always create them via the ui manually.

Ohad

··· On Fri, Nov 5, 2010 at 8:50 PM, Eric Snow wrote:

Does that still require that my manifests be in module format (with a
manifests directory in each module) or does it respect the manifests
at the top level of my manifests directory. I ask because I added
that setting with the path to my manifests directory and it did not
add the classes that are there. Thanks.

-eric

On Nov 5, 12:22 pm, Ohad Levy ohadl...@gmail.com wrote:

You can force the modulepath to be your manifest dir by using the
modulepath
setting in the config/settings.yaml file, i.e.
:modulepath: /etc/puppet/manifests

note that this will not work for importing the rest of your modules…

Ohad

On Fri, Nov 5, 2010 at 5:39 PM, Eric Snow <ericsnowcurren...@gmail.com > >wrote:

I run “rake puppet:import:puppet_classes RAILS_ENV=production” and it
imports all my classes from my module path just fine. However, it
misses everything in the manifestdir I have set for each environment
in my puppet.conf.

I found that the stuff in “app/models/environment.rb” is what does the
work and it only pulls classes from the modulepath. Any way it could
also pull from the manifestdir? Thanks.

-eric


You received this message because you are subscribed to the Google
Groups

“Foreman users” group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.comforeman-users%2Bunsubscribe@googlegroups.com
<foreman-users%2Bunsubscribe@goog legroups.com>

.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.comforeman-users%2Bunsubscribe@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.