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

R.I.Pienaar
Thu, 11 Nov 2010 16:50:27 -0000

----- "Eric Snow" <esnow@verio.net> wrote:

> -- 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.

are you sure the node {} is being loaded? add a notify in the node block
to confirm