版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、uppet实战-puppetapply puppet实战-puppetapply 命令:puppetapply运行本地Puppet,疑问请发邮件至 rootlinux57poc#puppethelppuppet-apply(8)-ApplyPuppetmanifestssastandalonePuppetmanifesttothelocalpuppet apply -h|-help -V|-ver -d|-debug -v|-ver-e|-execute -detailed-exitcodes -l|-logdest -apply-catalogThisisthestandalonepuppe
2、texecutiontool;useittoapply individual manifests.When provided wimodulepath, viadlineorconfigfile,puppet apply can effectively mimic the catalogt would be served by puppet master wis to the same modules, although there are some subtle-h|-help #e #-catalog#运行puppetmaster采.Whencombinedwithschedulingan
3、danautomatedsystempushingmanifests,thiscanbeusedtoimplementaserverlessMostusers.Whencombinedwithschedulingandanautomatedsystempushingmanifests,thiscanbeusedtoimplementaserverlessMostusersshouldusepuppetagentandpuppetmasterforsite-tanyconfigurationtshefileisalsoavalidlongargument.Forle,modulepathisva
4、lidconfigurationparameter,soyoucanspecify-tagsasanSeetheconfiguration HYPERLINK http:/d/ ation/stable/configuration.htmlforfulllistofacceptableparameters.Acommentedlistofconfigurationoptionssobegeneratedbyrunningpuppet*-Enablefull*Provideioninformationviaexitcodes.Ifthisisenabled,ancodeof2meansthere
5、werechanges,anexitcodeof4meanstherefailuresduringthechangesandion,andanexitcodeof6meanstherewere*thishelp*Load any stored classes. puppet agent caches configured classes (usuallyat/etc/puppet/classes.txt),andsettingthisoptioncausesallofthoseclassestobesetinyourpuppet*Wheretosendmessages.Choosensyslo
6、g,theconsole,andafile.Defaultstosendingmessagestothe*ExecuteaspecificpieceofPuppetPuppet,疑问请发邮件至 PuppetPuppet,疑问请发邮件至 rootlinux58poc puppet# mkdir -p /etc/puppet/modules/motd/manifests rootlinux58poc puppet# mkdir -p /etc/puppet/modules/motd/templates rootlinux58poc puppet# mkdir -p /etc/puppet/modu
7、les/motd/files rootlinux58pocpuppet#vim/etc/puppet/modules/motd/manifests/init.pp class motdpackage setup: ensure=present,extraApply a JSON catalog (such as one generated with puppet mastile).You eitherspecifyaJSONfileorpipeinJSONfromstandardinput.Deprecated,please use -catalog instead.Apply a JSON
8、catalog (such as one generated with puppet mastile).You eitherspecifyaJSONfileorpipeinJSONfromstandard$puppetapply-l/tmp/manifest.log$puppetapply-modulepath=/root/dev/modules-einclude$puppetapply-catalogLukeCopyright(c)2011PuppetLabs,LLCLicensedundertheApache2.0Puppet,疑问请发邮件至 Puppet,疑问请发邮件至 rootlinu
9、x58poc#catThu Jan 09 05:32:37Puppet(notice):Finishedcatalogrunin0.04 rootlinux58poc#puppetapply -debug-lrootlinux58poc # cat /tmp/motd.logThu Jan 09 05:32:37Puppet(notice):Finishedcatalogrunin0.04 ThuJan09Puppet(info):LoadingfactsThuJan09Puppet(debug):CreatingdefaultThu Jan 09 05:33:02Puppet(debug):
10、Failedtoloadlibraryldapfor feature ldapThu Jan 09 05:33:02Puppet(debug):Puppet:Type:User:ProviderLdap: feature ldap is missingThu Jan 09 05:33:02Puppet (debug): Puppet:Type:User:ProviderUser_role_add:fileroleadddoesnotexistThu Jan 09 05:33:02Puppet (debug): Puppet:Type:User:Providw:file pw does not
11、existfileowner = root, group = root, mode = 0400,content=template(motd/motd.erb), require = Packagesetup,rootlinux58pocpuppet#vim/etc/puppet/modules/motd/templates/motd.erb a few octer valuesmyhostname = eth0_ip= kernel = systemrelease= =%=puppetver = %= rubyverrootlinux58pocPuppet,疑问请发邮Puppet,疑问请发邮
12、件至 Thu Jan 09 05:33:02Puppet (debug): Puppet:Type:User:ProviderDirectoryservice:file/usr/bin/dscldoesnotexist Thu Jan 09 05:33:02e/graphs (debug): Autorequiring File/var/lib/puppet/sThu Jan 09 05:33:02/File/var/lib/puppet/facts(debug):Autorequiring Thu Jan 09 05:33:02/File/var/lib/puppet/ssl/certs(d
13、ebug): Autorequiring File/var/lib/puppet/sslThu Jan 09 05:33:02(debug): Autorequiring File/var/lib/puppet/sThu Jan 09 05:33:02m(debug): Autorequiring File/var/lib/puppet/ssl/certsThu Jan 09 05:33:02/File/etc/puppet/namespaceauth.conf(debug): Autorequiring File/etc/puppetThu Jan 09 05:33:02(debug): A
14、utorequiring File/var/lib/puppet/sThu Jan 09 05:33:02/File/var/lib/puppet/ssl/private(debug): Autorequiring File/var/lib/puppet/sslThu Jan 09 05:33:02nt_data(debug): Autorequiring File/var/lib/puppetThu Jan 09 05:33:02/File/var/lib/puppet/ssl/crl.pem(debug): Autorequiring File/var/lib/puppet/sslThu
15、Jan 09 05:33:02/File/var/lib/puppet/ssl/public_keys(debug): Autorequiring File/var/lib/puppet/sslThu Jan 09 05:33:02(debug): Autorequiring File/var/lib/puppet/sslThu Jan 09 05:33:02/File/var/lib/puppet/ssl(debug):Autorequiring Thu Jan 09 05:33:02nt_yaml(debug): Autorequiring File/var/lib/puppetThu J
16、an 09 05:33:02e(debug):Autorequiring Thu Jan 09 05:33:02.txt(debug): Autorequiring File/var/lib/puppet/sThu Jan 09 05:33:02e.yaml(debug): Autorequiring File/var/lib/puppet/sThu Jan 09 05:33:02/File/var/lib/puppet/ssl/private_keys(debug): Autorequiring File/var/lib/puppet/sslThu Jan 09 05:33:02/File/
17、var/lib/puppet/lib(debug):Autorequiring Thu Jan 09 05:33:02Puppet (debug): Finishing tranThu Jan 09 05:33:02Puppet (debug): Loaded se in 0.03 secondsThuJan09Puppet(debug):Loadedein0.00在本地运行命令,加载一个类,创建motdPuppet,疑问请发邮件在本地运行命令,加载一个类,创建motdPuppet,疑问请发邮件至 rootlinux58poc#rm-rfrootlinux58poc#puppetapply-e
18、includemotd-notice:/Stagemain/Motd/File/etc/motd/ensure:current_valueabsent,shouldbe file (noop)notice:ClassMotd:Wouldhavetriggeredrefreshfrom1events notice:Stagemain:Wouldhavetriggeredrefreshfrom1events notice: Finished catalog run in 0.17 secondsrootlinux58poc#puppetapply-eincludenotice:/Stagemain
19、/Motd/File/etc/motd/ensure:definedcontentas notice:Finishedcatalogrunin0.17seconds rootlinux58poc # cat /etc/motda few octervalues myhostname = linux58poceth0_ip=kernel=2.6.18-Thu Jan 09 05:33:02Puppet(info):Applyingconfigurationver Thu Jan 09 05:33:02/Scheduledaily (debug): Skipdeviceresour because
20、 running on a hostThu Jan 09 05:33:02/Schedulemonthly (debug): Skipbecause running on a hostThu Jan 09 05:33:02/Schedulehourly (debug): Skipdeviceresour because running on a hostThu Jan 09 05:33:02/Schedulenever (debug): Skipdeviceresour because running on a hostThu Jan 09 05:33:02kly (debug): Skipdeviceresour because running on a hostThu Jan 09 05:33:02/Schedulepuppet (deb
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 肺癌诊疗中国指南(2026 版)
- 河南郑州市2025年一级建造师考试(机电工程管理与实务)题库含答案
- 手术室护理伦理与法律
- Fumosorinone-生命科学试剂-MCE
- FM-678-生命科学试剂-MCE
- 妇产科护理副高:妇产科护理质量管理
- 2026linux笔试面试题及答案
- 2026java架构设计面试题及答案
- 2026年济南市槐荫区事业单位招考工作人员易考易错模拟试题(共500题)试卷后附参考答案
- 2026年泉州市晋江市社会工作发展服务中心招考男性专业社工督导易考易错模拟试题(共500题)试卷后附参考答案
- 【2025年】组织行为学试题及答案
- 2026年国开电大建筑制图基础形考考前冲刺测试卷及完整答案详解(历年真题)
- 市场监督管理局全流程市场监管工作手册(标准版)
- 学校物业服务会议服务方案
- UPS电源售后服务承诺书范本
- 统编人教版五年级语文下册《田忌赛马》示范教学课件
- 急性气管支气管炎课件教学
- GB/T 16124-2025水利水电工程环境健康影响评价技术规范
- 压力仪表培训课件
- 卒中绿色通道与团队快速反应流程优化
- 吉林省吉林市2025-2026学年度上学期期末质量检测 八年级物理试卷(含答案)
评论
0/150
提交评论