本文共 340 字,大约阅读时间需要 1 分钟。
exec { 'keep-nginx-running' : user => 'root', unless => 'ps -x | grep nginx|grep -v grep', command => 'systemctl start nginx.service', path => '/usr/bin:/usr/sbin:/sbin:/bin', }