'apache::service' is the name of a Class. You can look inside that class to find the service resource you're trying to notify. It's probably Service['apache2'].
-Doug On Thursday, April 30, 2015 at 11:38:29 PM UTC-4, bluethundr wrote: > > Hey all, > > I'd like to include the apache service in my php puppet module. Because > when changes are made to the php.ini file, naturally you'll need to bounce > apache (if thats your choice of web server) in order for changes to take > effect. > > Same thing with adding php modules, etc. > > So in my php puppet module I have this > > class php::configure { > include apache::service > > if $osfamily == "RedHat" { > > file { "/etc/php.ini": > owner => "root", > group => "root", > mode => 0644, > source => "puppet:///modules/php/php.ini", > notify => Service["apache::service"], > } > > } > } > > And this: > > class php::install { > > include apache::service > > if $osfamily == "RedHat" { > > case $operatingsystemmajrelease { > > ..... > > "7": { > > package { [ "php", "php-cli", "php-devel", "php-imap", "php-ldap", > "php-mysqlnd", "php-mcrypt", "php-xml", "php-gd", "php-pgsql", "php-pdo", > "php-mbstring", "php-xmlrpc", "php-process" ]: > ensure => present, > notify => Service["apache::service"], > } > > .... > > } > > Yet when I try to run puppet on the client node, I'm getting this result: > > Could not retrieve fact='nr_java_found', resolution='<anonymous>': > undefined method `start_with?' for nil:NilClass > Error: Could not retrieve catalog from remote server: Error 400 on SERVER: > Invalid relationship: Package[php] { notify => Service[apache::service] }, > because Service[apache::service] doesn't seem to be in the catalog > Warning: Not using cache on failed catalog > Error: Could not retrieve catalog; skipping run > > > So just what in the heck am I doing wrong, if I may ask??? > > Thanks!! > Tim > > > -- > GPG me!! > > gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B > > -- 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 puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/8a61e28b-6828-491e-9fb3-97562635531c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.