Puppet 木偶:如何使用;定义为;在exec中键入as requirement

Puppet 木偶:如何使用;定义为;在exec中键入as requirement,puppet,Puppet,我对类型的定义如下 define fill_templates() { $fileName = $name["filename"] $fileLocation = $name["filelocation"] file { "${fileLocation}/${fileName}/": ensure => present,

我对类型的定义如下

define fill_templates() {
    $fileName = $name["filename"]                                                      
    $fileLocation = $name["filelocation"]  
    file { "${fileLocation}/${fileName}/":
        ensure  => present,
        owner   => 'root',
        group   => 'root',
        mode    => '0777',
        content => template("config/${fileName}.erb"),
    require => Exec["unzip_pack"],
}
}

我称这种类型为

fill_templates { $foo:}
我想把这作为我的另一位主管的先决条件。所以我想让它成为那个执行官的“必需品”

exec { "strating":
    user       => 'root',
    environment => 'JAVA_HOME=/home/agent2/jdk1.6.0',
    path        => $command_path,
    command    => "${agents_location}/...../bin/myFiler.sh",
   logoutput => true,
timeout => 3600,
require =>XXXXXXXXXXX,
  }

我该怎么做呢?

这应该可以做到:

require => Fill_templates[$foo],

资本化很重要。

xxxxxxxxxx
->
填充模板[$foo]
?是这样吗?