Hi,

I'm have this in my nginx module:

class nginx::package {
  package { 'nginx': ensure => latest }
  ### there is more code here handling different ditro versions ... etc
}
class nginx::service {
  service { 'nginx':
    ensure     => running,
    enable     => true,
    hasrestart => true,
    restart    => '/etc/init.d/nginx reload',
    require    => Class['nginx::package', 'nginx::config'],
    subscribe  => Class['nginx::package', 'nginx::config'],
  }
  ### there is more code here ...
}

class nginx::config {
  File {
    require => Class['nginx::package'],
    notify  => Class['nginx::service'],
  }



  define extra ($source=nil, $template=nil) {
    file { "/etc/nginx/sites-enabled/$name":
      source => $source
    }
    if $require {
      File["/etc/nginx/sites-enabled/$name"] {
        require +> $require
      }
    }
    if $notify {
      File["/etc/nginx/sites-enabled/$name"] {
        notify +> $notify
      }
    }
  }
}

When I originally wrote this, it was actually working and adding
nginx::config::extra did notify nginx::service, but now it somewhat doesn't
(Puppet 2.7.11). Could it be a recent bug or it only seemed to work?

Actually, I realise now that I may have had Puppet 2.7.17 when I was
testing this originally ... could it be something that has been fixed after
2.7.11?

Cheers,
-- 
Ilya

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

Reply via email to