Thank you John, You were of course correct, I did have another bleachbit 
module floating around. After I initially installed puppet, bumbling around 
not really knowing what I was doing, I started to work in the 
/home/tony/.puppetlabs area. Later, can't remember why now, I switched to 
/etc/puppetlabs. However, I'd left a bleachbit module behind and as 
/home/tony/.puppetlabs was first in the modulepath, it was using that 
version and quite legitimately ignoring my new version. 

Also I tided up the notify statement (actually I only just added the notify 
bit as I thought it may a dependency issue and didn't run that particular 
version against puppet-lint so I expect that would have got picked up).

Thanks again. Seems obvious now but I guess when you're working on 
something new, it's easy to get confused. Anyway, one good thing, I learnt 
quite a lot trying to troubleshoot the problem!! I'll stop waffling now....

On Tuesday, April 26, 2016 at 3:38:24 PM UTC+1, Tony Davis wrote:
>
> Hi, I'm fairly new to puppet but I've been trying to create some puppet 
> modules to help me maintain my various PCs/laptops at home. I have created 
> the following module:
>
> my module init.pp contains
>
>
> class bleachbit {
>   include bleachbit::install
>   include bleachbit::cronadd
> }
>
> install.pp has
>
> class bleachbit::install {
>   package { 'bleachbit':
>     ensure => installed,
>     notify => Cronadd['bleachbit'],
>   }
> }
>
> cronadd.pp has
>
> class bleachbit::cronadd {
>   cron { 'bleachbit':
>     ensure  => present,
>     command => '/usr/bin/bleachbit',
>     user    => 'root',
>     weekday => '*',
>     minute  => '10',
>     hour    => '11',
>     subscribe => Package['bleachbit'],
>   }
> }
>
> site.pp has 
>
> node 'Microserver' {
>     include bleachbit
>     include testfile
> }
>
> when I run "puppet apply manifests" bleachbit is installed fine but the 
> cronadd subclass is completely ignored. I have checked the syntax with 
> puppet-lint
> and it seems fine. Also, if create cronadd as a separate module, it works 
> fine.
>
> I don't understand what the problem is. Running with --debug gives no clues.
>
> Thanks!
>  
>
>
>
>
>

-- 
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/47071ad1-183d-46c1-846b-5ad8bb431937%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to