10.7. 将 Satellite 配置为使用备用目录在主机上执行远程作业
默认情况下,Satellite 使用客户端系统上的 /var/tmp
目录来执行远程执行作业。如果客户端系统为 /var/
卷或文件系统设置 noexec
,您需要将 Satellite 配置为使用替代目录,否则远程执行任务会失败,因为无法运行脚本。
流程
创建新目录,如 new_place :
mkdir /remote_working_dir
# mkdir /remote_working_dir
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 从默认
var
目录中复制 SELinux 上下文:chcon --reference=/var /remote_working_dir
# chcon --reference=/var /remote_working_dir
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 配置系统:
satellite-installer --foreman-proxy-plugin-remote-execution-ssh-remote-working-dir /remote_working_dir
# satellite-installer --foreman-proxy-plugin-remote-execution-ssh-remote-working-dir /remote_working_dir
Copy to Clipboard Copied! Toggle word wrap Toggle overflow