Hi,
This one is driving me crazy. Problem is Puppet try to start some
services (in this case zabbix-agent) before it is installed.

My puppet-master is Debian 5.05 with Puppet 2.6.0 (from squeeze).
Target system is FreeBSD 8.1 with Puppet 2.6.1 (from packages-8-
stable).

When I run puppet manually in debug-mode I get:
MASTER:
debug: Adding relationship from Package[zabbix-agent] to File[zabbix-
agent_conf] with 'before'
debug: Adding relationship from File[zabbix-agent_conf] to
Service[zabbix-agent] with 'before'

AGENT:
debug: Puppet::Type::Package::ProviderFreebsd: Executing '/usr/sbin/
pkg_info'
debug: Service[zabbix-agent](provider=freebsd): Could not find
zabbix_agentd in /etc/rc.d
debug: Service[zabbix-agent](provider=freebsd): Could not find
zabbix_agentd in /usr/local/etc/rc.d
debug: Service[zabbix-agent](provider=freebsd): Could not find
zabbix_agentd.sh in /etc/rc.d
debug: Service[zabbix-agent](provider=freebsd): Could not find
zabbix_agentd.sh in /usr/local/etc/rc.d
err: Could not run Puppet configuration client: Could not find init
script for 'zabbix_agentd'

My modules init.pp-file looks like this (Debian-stuff is commented out
for troubleshooting):
-----------------------------------------------------------------------------
####################
### zabbix agent ###
####################

class zabbix-agent {
   Package['zabbix-agent'] -> File['zabbix-agent_conf'] ->
Service['zabbix-agent']

   #######################
   ### Install package ###
   #######################
   package { zabbix-agent :
      name   => $operatingsystem ? {
         freebsd => 'zabbix-agent',
         #debian  => '',
         #default => '',
      },
      alias  => "zabbix-agent",
      ensure => installed,
   }


   #######################
   ### Get config-file ###
   #######################
   file { 'zabbix-agent_conf' :
      path    => $operatingsystem ? {
         freebsd => "/usr/local/etc/zabbix/zabbix_agentd.conf",
         #debian  => "/etc/zabbix/zabbix_agentd.conf",
         #default => "/usr/local/etc/zabbix/zabbix_agentd.conf",
      },
      ensure   => file,
      checksum => md5,
      owner    => 'root',
      group    => $operatingsystem ? {
         freebsd => 'wheel',
         debian  => 'root',
         default => 'wheel',
      },
      mode     => 644,
      require  => Package['zabbix-agent'],
      source   => "puppet://10.10.10.10/modules/zabbix-agent/$hostname/
zabbix_agentd.conf",
   }

   #####################
   ### Start service ###
   #####################
   service { zabbix-agent :
      name    => $operatingsystem ? {
         freebsd => 'zabbix_agentd',
         #debian  => [""],
         #default => [""],
      },
      require => Package['zabbix-agent'],
      ensure  => running,
      enable  => true,
    }
}

------------------------------------------------------------------------
Does anyone have a clue why it's behaving this way?

Best regards,
Freddie

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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