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