C.4. 渲染 restorecon 模板
本例演示了如何创建从 第 C.3 节 “restorecon 模板示例” 中创建的 Run command - restorecon 模板派生的模板。此模板在在作业执行时不需要用户输入,它将在目标主机上的 /home/
目录下的所有文件中恢复 SELinux 上下文。
按照 第 13.21 节 “设置作业模板” 所述创建新模板,并在模板编辑器中指定以下字符串:
<%= render_template("Run Command - restorecon", :directory => "/home") %>
<%= render_template("Run Command - restorecon", :directory => "/home") %>