In regard to: [Puppet Users] Could not evaluate: Could not retrieve...:

class ntp {
       if $is_virtual == 'false' {
               package { 'ntp':
               ensure => present,
       }
               service { 'ntp':
                 ensure     => 'running',
                 enable     => 'true',
                 hasrestart => 'true',
                 require    => Package['ntp']
       }
               file { "/etc/ntpd.conf":
                 owner   => "root",
                 group   => "root",
                 mode    => 0644,
                 require => Package["ntp"],
                 source =>
"puppet://$puppetserver/modules/ntp/files/etc/ntp.conf",
               }
       }
       if $is_virtual == 'true' {
               package { 'ntp':
               ensure => purged,
               }
       }
}

Your indenting is a little strange, but I would start by using
notice/notify/fail or whatever you prefer to determine what is_virtual
actually is set to.

There was a thread about quoting and true/false a few months ago, search
the archives for that.  I can't remember if the style guide was updated
with recommendations regarding quoting true/false, but that would also
be a place to look.

Try using yes/no (as strings) and checking for that in your class.

You may also want to run puppet-lint on your manifests, it's not perfect
but it will help catch a number of issues.

Tim
--
Tim Mooney                                             tim.moo...@ndsu.edu
Enterprise Computing & Infrastructure                  701-231-1076 (Voice)
Room 242-J6, IACC Building                             701-231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164

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