|
#vsftpd,启动且开机自起
vi /etc/puppet/manifest/test.pp
service {"vsftpd":
ensure => running,
enable => true;
}
#检查
[root@client ~]# /etc/init.d/vsftpd status
vsftpd is stopped
[root@client ~]# chkconfig --list vsftpd
vsftpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
[root@client ~]#
[root@client ~]# puppet agent --test -v --server master.perofu.com
info: Caching catalog for client.perofu.com
info: Applying configuration version '1395069819'
notice: /Stage[main]//Service[vsftpd]/ensure: ensure changed 'stopped' to 'running'
notice: Finished catalog run in 0.38 seconds
[root@client ~]#
[root@client ~]# /etc/init.d/vsftpd status
vsftpd (pid 20118) is running...
[root@client ~]# chkconfig --list vsftpd
vsftpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
#源码
service {"httpd":
ensure => running,
#restart => "/usr/local/apache2/bin/apachectl restart",
hasrestart => "true",
subscribe => File["/etc/httpd/httpd.conf"]
} |
|
|