深度分析puppet自带filebucket恢复功能_第1页
深度分析puppet自带filebucket恢复功能_第2页
免费预览已结束,剩余3页可下载查看

付费下载

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

puppetfilebucketpuppetmasterMC实现,至于变更的回滚可以通过SVNGitpuppetmaster管理的配置文件,在你做puppet推送之后,那个管理员的配置文件被还原了。而那个管理员发现应1filebucket[root@linuxmaster1pocmanifests]#catsite.ppimport'nodes/*.pp'$puppetserver='puppetmas filebucket{'main':path=>}/puppet/version/hosts/${fact_certname},其中变量fact_cartname为获取的certname名自定义的fact变量,如何[root@linuxmaster1pocmanifests]#catsite.ppimport'nodes/*.pp'$puppetserver='puppetmas filebucket{'main':path=>} 2、定义clientbucketdir和 在puppetfilebucketbackup[root@linux57poc~]#在puppetfilebucketbackup[root@linux57poc~]#cat/etc/puppet/puppet.confuser=puppetgroup=vardir=/var/lib/puppetlogdir=rundirrundir=/var/run/puppetssldir=$vardir/sslpluginsync=trueclientbucketdir=/puppet/version/hosts/puppet_linux57bucketdir=/puppet/version/hosts/puppet_linux57server=classfile=$vardir/classes.txtlocalconfig=$vardir/localconfigreport=authconfig=/etc/puppet/namespaceauth.confusecacheonfailure=falsecertname=puppet_linux57environment=production listen= puppetport= bindaddress=classinclude}classinclude}puppet_linux57poc::motd{package{setup:ensure=>}file{owner=>"root",group=>"root",mode=>0400,content=>template("puppet_linux57poc/motd.erb"),backup=>'main',require=>}}puppet_linux57poc::facts{file{"/backup=> =>content=>template("puppet_linux57poc/facts.txt.erb"),backup=>'main',}}4、测试filebucket的恢复功 [root@linux57poc~]#echo[root@linux57poc~]#echo[root@linux57poc~]#puppetagent-tinfo:Retrievingplugininfo:Loadingfactsin/var/lib/puppet/lib/facter/fact_apply.rbinfo:Cachingcatalogforpuppet_linux57info:Applyingconfigurationversion notice:---/etc/mcollective/facts.yaml2013-12-03+++/tmp/puppet- -14159-i1qgrq-02013-12-03@@-1,89+1,89info:FileBucketaddingFilebucketed/etc/mcollective/facts.yamltomainwithsumnotice:--- 2013-12-03@@-7,4+7,3rubyversion=2013-12-03-info:FileBucketaddinginfo:/Stage[main]/Puppet_linux57poc::Motd/File[/etc/motd]:Filebucketed/etc/motdtomainwithsum6db65f0eb756ee96ef8e615e914fa0eenotice:/Stage[main]/Puppet_linux57poc::Motd/File[/etc/motd]/content:contentchanged'{md5}6db65f0eb756ee96ef8e615e914fa0ee'tonotice:Finishedcatalogrunin0.69[root@linux57poc~]# total-r--r-----1nfsnobodynfsnobody311Dec317:56-rw-r-----1nfsnobodynfsnobody10Dec317:56root@linux57poc~]#puppetfilebucketlocalbackup/etc/motd:[root@linux57poc~]# total-r--r-----1nfsnobodynfsnobody311Dec317:56-rw-r-----1nfsnobodynfsnobody10Dec317:56paths[root@linux57poc~]#[root@linux57poc~]#[root@linux57poc~]#puppetfilebucket--localrestore/etc/motd[root@linux57poc~]#catafewoffactervaluesmyhostname=linux57poceth0_ip=kernel=2.6.18-systemrelease=RedHatEnterpriseLinuxServerrelease5.7(Tikanga)puppetversion=2.7.23rubyversion=[root@linux57poc [root@linuxreportpoc[root@linuxreportpoc~]#ll/puppet/version/hoststotal12drwxr-x---12nfsnobodynfsnobody4096Dec317:56drwxr-x---10nfsnobodynfsnobody4096Dec317:08drwxr-x---drwxr-x--

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论