Simon J Mudd schrieb:
> [email protected] (puppet) writes:
>
>   
>> Replace this line:
>>     
>>>          $download_dir      = '/root/tmp'
>>>       
>> with:
>>
>>        #NOTE: generate is executed on the puppetmaster.
>>         $download_dir = generate("/usr/bin/env","bash",'-c',"/bin/
>> mktemp")
>>
>> With this every time your definition get used it will choose an random
>> folder in your /tmp.
>>     
>
> Thanks. The idea is good, but it doesn't quite work.
>
> 1. The script unfortunately contains account information
>    user/passwords for the application's initial installation. Hence
>    /root/tmp is better as only root users can access this directory.
>
>   
1.) With
    mktemp -p /root

this will choose a random folder name begining with /root


2. ) permissions?
Your puppet code:

file { "$download_dir":
                 owner   => root,
                 group   => root,
                 mode    => 700,
                 ensure  => directory,
         }

takes already care that only root has access of new generated files in 
the folder $download_dir ?
At least my tests confirmed  that ...


3.) Clean-up of the random folder?

may something like this helps?

exec { "$install_script/$software_env":
                 command => "$download_dir/$install_script ... appropriate 
parameters ...  && rm Rf $download_dir",
                 onlyif  => "... test if software not installed ...",
                 require => File["$download_dir/$install_script"]
         }



Philipp

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