Puppet: Could not find init script for 'squid'

Posted by chris on Server Fault See other posts from Server Fault or by chris
Published on 2012-03-06T10:44:45Z Indexed on 2012/06/17 21:18 UTC
Read the original article Hit count: 265

Filed under:

I'm using Puppet to install ufdbGuard which requires Squid 2.7 (which is correctly installed and working properly).

Here is the relevant class:

class pns_client::squid {

package { 'squid':
  ensure => present,
  before => File['/etc/squid/squid.conf'],
}


if $::ufdbguard_installed == "true" {
    $squidconf = 'puppet:///modules/pns_client/squid.conf_ufdbguard'
} else {
    $squidconf = 'puppet:///modules/pns_client/squid.conf'
}

notify{$squidconf:}

file { '/etc/squid/squid.conf':
  ensure => file,
  mode   => 644,
  source => $squidconf,
}

service { 'squid':
  ensure     => running,
  enable     => true,
  hasrestart => true,
  hasstatus  => true,
  subscribe  => File['/etc/squid/squid.conf'],
}
}

When running, I get this error:

err: /Stage[main]/Pns_client::Squid/Service[squid]: Could not evaluate: Could not find init script for 'squid'

This happens on all freshly-installed Debian 6 and Unbuntu 10.04/11.04 machines.

Any ideas?

© Server Fault or respective owner

Related posts about puppet