> how do i stop client? it is trying to install xntp, that is a SLES
> thing, debian uses "ntp"

Out of curiosity - what does 'facter' show for operatingsystem:

$ facter | grep operatingsystem

> on my client
>
> May 13 13:18:01 tomcat1 puppetd[6146]: Starting catalog run
> May 13 13:18:01 tomcat1 puppetd[6146]: (//ntp/File[/etc/ntp.conf])
> Failed to retrieve current state of resource: Could not connect to
> puppetmaster.uits.uconn.edu on port 8140 Could not describe /ntp/
> ntp.conf.Deb: Could not connect to puppetmaster.uits.uconn.edu on port
> 8140 at /etc/puppet/modules/ntp/manifests/init.pp:13
> May 13 13:18:01 tomcat1 puppetd[6146]: (//ntp/Package[xntp]/ensure)
> change from purged to latest failed: Could not update: Execution of '/
> usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install xntp'
> returned 100: Reading package lists...#012Building dependency
> tree...#012Reading state information...#012E: Couldn't find package
> xntp#012 at /etc/puppet/modules/ntp/manifests/init.pp:3

The message 'Could not connect' is not healthy - can you connect to
your puppetmaster from that box?

$ telnet puppetmaster.uits.uconn.edu 8140

>
> on my master
>
> puppetmaster:/etc/puppet/modules/ntp/manifests# more init.pp
> class ntp {
>
>     file { "/etc/ntp.conf":
>       source => $operatingsystem ? {
>       Debian => "puppet:///ntp/ntp.conf.Deb",require =>
> Package["ntp"],package { ntp: ensure => latest },
>       SLES => "puppet:///ntp/ntp.conf.SLES", require =>
> Package["xntp"],package { xntp: ensure => latest },
>     },
>         owner   => root,
>         group   => ntp,
>         mode    => 640,
>     }
>
> }

What version of puppet are you using? That code doesn't even parse on
my 0.25.4 instance here.

I would imagine the code to be more like:

class ntp {
  case $operatingsystem {
    Debian: {
      file {"/etc/ntp.conf":
        source => "puppet:///ntp/ntp.conf.Deb",
        require => Package["ntp"]
      }
      package {"ntp":
        ensure => latest
      }
    }
    SUSE: {
      file {"/etc/ntp.conf":
        source => "puppet:///ntp/ntp.conf.SUSE",
        require => Package["xntp"]
      }
      package {"xntp":
        ensure => latest
      }
    }
  }
}

Or perhaps:

class ntp {
 file {"/etc/ntp.conf":
  source => "puppet:///ntp/ntp.conf.${operatingsystem},
  require => Package["ntp"],
 }
 package {"ntp":
  name => $operatingsystem ? {
   SUSE => "xntp",
   default => "ntp"
  }
 }
}

ken.

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

Reply via email to