[Puppet Users] Re: possible bug with notify?

Larry Ludwig
Wed, 28 May 2008 17:52:07 -0000

> I''m confident that ''notify'' is working fine.

Hi Luke,

Are you sure about this?  I''ve tested this a few times and get the
same result.  Only touching the directadmin.conf in the example below
results in a restart

Here is another example:
class directadmin {
        file { "directadmin":
                checksum => md5,
                name     => "/usr/local/directadmin/directadmin",
        }
        # track directadmin.conf changes
        file { "directadmin.conf":
                checksum => md5,
                name     => "/usr/local/directadmin/conf/
directadmin.conf",
                owner    => ''diradmin'',
                group    => ''diradmin'',
                mode     => ''0600'',
                backup   => local,
                require  => File["directadmin"],
                notify   => Service["directadmin"],
        }
        line {"directadmin.conf-logs_to_keep":
                file     => "/usr/local/directadmin/conf/
directadmin.conf",
                line     => "logs_to_keep=14",
                ensure   => present,
                require  => File["directadmin.conf"],
                notify   => Service["directadmin"],
        }
        # monitor the service to ensure it''s running
        service { "directadmin":
                name       => "directadmin",
                ensure     => running,
                enable     => true,
                hasrestart => true,
                hasstatus  => true,
        }

May 28 13:47:32 skylla puppetd[7789]: Starting Puppet client version
0.24.4
May 28 13:47:43 skylla puppetd[7789]: Starting catalog run
May 28 13:47:48 skylla puppetd[7789]: (//Node[skylla]/template-
directadmin/directadmin/Line[directadmin.conf-logs_to_keep]/Exec[/bin/
echo ''logs_to_keep=14'' >>
''/usr/local/directadmin/conf/
directadmin.conf'']/returns) executed successfully
May 28 13:48:03 skylla puppetd[7789]: Finished catalog run in 20.84
seconds

Looks like a bug to me.