[英]Can I take create_resources as requirement to exec command
我是否可以根據需要在puppet類的exec命令中使用create_resources
$configFileDetails = getConfigFileDetails($allConfigurations['configurations'])
create_resources(change_config::fill_template, $configFileDetails)
Change_config::Fill_template<| |> -> Exec<| title == "strating" |>
exec { "strating":
user => 'root',
environment => "JAVA_HOME=/home/ubuntu/tools/jdk1.6.0_45",
path => $command_path,
command => "sh ${agentLocation}/${product_pack}/bin/server.sh ${serverOptions}",
logoutput => true,
timeout => 3600,
}
}
有沒有辦法在這里使用create_resources作為exec的要求?
我猜你的意思是要求create_resources要求創建的資源,如果是這樣,則可以使用收集器確保順序
exec { "strating" :
....
}
Myclass::Myfunc <||> -> Exec <| title == "strating" |>
希望這可以幫助
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.