Centos 6.3下Puppet功能模块实例笔记
副标题[/!--empirenews.page--]
今天来介绍Puppet的具体实用功能,其实我的理解就是怎么偷懒,呵呵。 1.填充文件内容: (server): 修改server端配置文件: # vi /etc/puppet/manifests/site.pp ----------------- node default{ file { "/tmp/test": content=> "this is a test file"; } } ----------------- 重启puppetmaster,更新配置文件信息。 # service puppetmaster restart (client): 重启puppet(可不用重启) # service puppet restart 同步文件: # puppetd --server server.example.com --test ------------------ warning: peer certificate won't be verified in this SSL session info: Caching certificate for client.example.com info: Caching certificate_revocation_list for ca info: Caching catalog for client.example.com info: Applying configuration version '1369124449' notice: /Stage[main]//Node[default]/File[/tmp/test]/ensure: defined content as '{md5}100b144907af2a4786003758a0a6a563' info: Creating state file /var/lib/puppet/state/state.yaml notice: Finished catalog run in 0.02 seconds ------------------ 查看/tmp/test文件及文件内容 # cat /tmp/test ----------- this is a test file ----------- (编辑:应用网_丽江站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |