远程执行命令

1.在 类 apache file下面 写入
exec {"123":                                                       #名字
unless => "test -f /tmp/aminglinux.txt",     # 条件,假设这个条件不成立,则执行 command
# onlyif => " test -f /tmp/aminglinux.txt ",
path => ["/bin","/sbin","/usr/bin","/usr/sbin"],   # touch 命令的 path 路径
command => "touch /tmp/ aminglinux.txt "    # 所要执行的命令
}

你可能感兴趣的:(远程执行命令)