aws*_*siv 8 configuration-management cfengine
我想列出目录内容并在其他地方使用结果:
bundle agent test
{
commands:
"ls /tmp/test/";
reports:
ubuntu::
"print output here for example";
# or add it to a variable which is how I really want to use it.
}
Run Code Online (Sandbox Code Playgroud)
fak*_*ker 12
bundle agent test
{
vars:
"my_result" string => execresult("/bin/ls /tmp/test/","noshell");
reports:
ubuntu::
"Output is : $(my_result)";
}
Run Code Online (Sandbox Code Playgroud)
见https://cfengine.com/manuals/cf3-solutions#Execresult-example
| 归档时间: |
|
| 查看次数: |
1104 次 |
| 最近记录: |