本文共 729 字,大约阅读时间需要 2 分钟。
mkdir -p /etc/puppet/modules/test/{manifests,templates,files}
vi /etc/puppet/modules/test/manifests/init.pp class test { file {"/tmp/$hostname.txt":content=>"Hello World!";} } vi /etc/puppet/modules/test/templates/test.erb hostname <%= fqdn %>mkdir -p /etc/puppet/manifests/nodes/
vi /etc/puppet/manifests/nodes/huangat-test.pp node 'huangat-test' { include test } vi /etc/puppet/manifests/site.pp node default { notify {'test-success': name => 'test-suecces1', message => 'connect successtest', } } import "nodes/*.pp"puppet parser validate /etc/puppet/modules/test/manifests/init.pp
puppet agent --test --server zhoulj-test --noop
mco puppet runonce -I huangat-test -v
转载地址:http://nhhnx.baihongyu.com/