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