Hi,

I've the following class which- depending on the department - changes
the krb5.conf. How could I use notice to only be used if the file gets
changed/updated? I don't see a way to use notice in the file resource
directly.


class stz_krb5 {

        notice("/etc/krb5.conf Check host: $::hostname department:
$stz_krb5::DEPARTMENT")

        $SOURCE_FILE="puppet://$puppet_fileserver/files/etc/krb5.conf"
        $DST_FILE="/etc/krb5.conf"


 if ( $stz_krb5::DEPARTMENT != 'foo' ){
                if ( $stz_krb5::DEPARTMENT != bla' ){
                                file { "krb5.conf":
                                name => $DST_FILE,
                                source => $SOURCE_FILE,
                                mode => 644,
                        }
                } else {
                        notice("Not updating krb5.conf - this is a
bla. host: $::hostname department: $stz_krb5::DEPARTMENT")
                }
        } else {
                notice("Not updating krb5.conf - this is a foo System.
host: $::hostname  department: $stz_krb5::DEPARTMENT")
        }
}

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