Is there a condition test to see if a file exists on the
puppetmaster?

I have about 15 different license files that are loaded on thirteen
servers. Not every license goes on every server. I'd like to serve the
files only if they exist on the puppet master server. I'm thinking of
doing it like this:

define install_license($host) {
   if(exists("/var/puppet/modules/atg/files/${host}/${name}")){
      file { $name:
        path    => "${dynamo_home}/localconfig/${name}",
        mode    => $mode,
        owner   => $owner,
        group   => $group,
        source  => "puppet://puppet.armstrong.com/atg/${host}/$
{name}",
        ensure  => present,
        backup  => main,
        require => Package["ATG"]
      }
    }
  }

 install_license {[
    "A.properties",
    "B.properties",
    "C.properties",
    "D.properties",
    "E.properties",
    "F.properties",
    "G.properties",
    "H.properties",
    "I.properties",
    "J.properties",
    "K.properties",
    "L.properties"]:
    host => $fqdn
 }

I'm open to other ideas. The thought is I'd have one mechanism for
loading license files and I'd manage them inside directories named
after the $fqdn For this to work, I need that "exists" function.

TIA,
Jeff
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to