Ah,
I see an error in my reasoning here:
On 06.10.2008, at 20:36, udo waechter wrote:

What comes to my mind now, is that I can do a hack and replace:

                @@file{"queue-template-${name_real}":
                        path => "${sge_collects}/queue.template-${name_real}",
                             ensure => $ensure,
                             tag => "sge_queue_template",
                             content => template("sge/queue.template.erb"),
                             notify =>  Exec["sge_queue_exec"],
                }

above with:
                $queue_template_content = template("sge/queue.template.erb")
                @@exec{"queue-template-${name_real}-${hostname}":
command => "cat ${quue_template_content} > ${sge_collects}/ queue.template-${name_real}",
                        onlyif => "test ! -e 
${sge_collects}/queue.template-${name_real}",
                             tag => "sge_queue_template",
                             notify =>  Exec["sge_queue_exec"],
                }
This would still export the exec multiple times, but it would get executed only once due to the "onlyif" parameter. I do this already in the "define sge::queue". I do not like it though since it is a hack. But alas, at least it would work I guess.
If some parameters in the define change, the template's content changes. This is not reflected in the exec above, since the file already exists....

What makes this approach unusable is that the created file is empty. The content of the template is not available on the collecting host. This somehow is clear. I should have thought earlier about this....

udo.
--
:: udo waechter - [EMAIL PROTECTED] :: N 52º16'30.5" E 8º3'10.1"
:: genuine input for your ears: http://auriculabovinari.de
::                          your eyes: http://ezag.zoide.net
::                          your brain: http://zoide.net




Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to