[Puppet Users] Re: When do modules get auto-imported

Eric Snow
Thu, 11 Nov 2010 16:44:18 -0000

-- puppet.conf --

[main]
    modulepath = /usr/share/puppet/production/modules

[development]
    modulepath = /usr/share/puppet/development/modules/settings

[testing]
    modulepath = /usr/share/puppet/testing/modules

[production]
    modulepath = /usr/share/puppet/production/modules

-- /usr/share/puppet/development/modules/settings --

settings
|-- all
    |-- manifests
        |-- init.pp
        |-- hosttypes.pp

-- node (in development) --

node test {
    include hosttypes::unassigned
}

-- init.pp --

import "*"

-- hosttypes.pp --

class hosttypes::unassigned {
    notify {"hosttypes::unassigned ": }
    notice("hosttypes::unassigned ")
    service {"httpd":
        enable => false,
        ensure => stopped,
    }
}

-- output --

/usr/sbin/puppetd --logdest console --test --noop
info: Caching catalog for <HOSTNAME>
info: Applying configuration version ''1289493629''
notice: Finished catalog run in 0.51 seconds


The httpd service is enabled and running when this run happens so it
should report the noop.  As well, neither the notice nor the notify
happens.  This is a simplification, but represents our situation.

-eric

On Nov 11, 9:26 am, "R.I.Pienaar" <r...@devco.net>
wrote:
> ----- "Eric Snow" <es...@verio.net> wrote:
>
> > Trying to track down why all the modules in my production environment
> > are auto-loaded at the beginning of a run for a node that is in my
> > development environment.  The run fails because it cannot find the
> > modules in my development environment which are named differently
> > from
> > production.  Makes me think that the wrong ones are getting auto-
> > loaded, or that it is looking for the development modules in the
> > wrong
> > place.
>
> would be best if you showed how its set up, file names classes etc