puppet确保程序运行

Posted on 2018-10-18 10:00  #大囚长#  阅读(106)  评论(0编辑  收藏  举报
        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',
        }