设为首页 收藏本站
查看: 904|回复: 0

[经验分享] Puppet apply命令参数介绍(五)

[复制链接]

尚未签到

发表于 2018-8-1 13:38:34 | 显示全部楼层 |阅读模式
[root@sh-proxy2 ~]# puppet apply -h  
puppet-apply(8) -- Apply Puppet manifests locally
  
========
  
SYNOPSIS
  
--------
  
Applies a standalone Puppet manifest to the local system.
  
USAGE
  
-----
  
puppet apply [-h|--help] [-V|--version] [-d|--debug] [-v|--verbose]
  
  [-e|--execute] [--detailed-exitcodes] [-L|--loadclasses]
  
  [-l|--logdest syslog|eventlog|<FILE>|console] [--noop]
  
  [--catalog <catalog>] [--write-catalog-summary] <file>
  
DESCRIPTION
  
-----------
  
This is the standalone puppet execution tool; use it to apply
  
individual manifests.
  
When provided with a modulepath, via command line or config file, puppet
  
apply can effectively mimic the catalog that would be served by puppet
  
master with access to the same modules, although there are some subtle
  
differences. When combined with scheduling and an automated system for
  
pushing manifests, this can be used to implement a serverless Puppet
  
site.
  
Most users should use 'puppet agent' and 'puppet master' for site-wide
  
manifests.
  
OPTIONS
  
-------
  
Note that any setting that's valid in the configuration
  
file is also a valid long argument. For example, 'tags' is a
  
valid setting, so you can specify '--tags <class>,<tag>'
  
as an argument.
  
See the configuration file documentation at
  
http://docs.puppetlabs.com/references/stable/configuration.html for the
  
full list of acceptable parameters. A commented list of all
  
configuration options can also be generated by running puppet with
  
'--genconfig'.
  
* --debug:        #调试模式,输出执行过程的调试信息
  
  Enable full debugging.
  
* --detailed-exitcodes:#提供退出代码的信息,2表示代码有变化,4表示失败,6两者都有.
  
  Provide transaction information via exit codes. If this is enabled, an exit
  
  code of '2' means there were changes, an exit code of '4' means there were
  
  failures during the transaction, and an exit code of '6' means there were both
  
  changes and failures.
  
* --help:
  
  Print this help message
  
* --loadclasses:    #加载任何存储的类,通常puppet agent类配置缓存在/etc/puppet/classes.txt,设置这个参数导致所有选择的类将设置在puppet 清单中.
  
  Load any stored classes. 'puppet agent' caches configured classes
  
  (usually at /etc/puppet/classes.txt), and setting this option causes
  
  all of those classes to be set in your puppet manifest.
  
* --logdest:        #日志路径
  
  Where to send log messages. Choose between 'syslog' (the POSIX syslog
  
  service), 'eventlog' (the Windows Event Log), 'console', or the path to a log
  
  file. Defaults to 'console'.
  
  A path ending with '.json' will receive structured output in JSON format. The
  
  log file will not have an ending ']' automatically written to it due to the
  
  appending nature of logging. It must be appended manually to make the content
  
  valid JSON.
  
* --noop:        #只运行代码,不应用catalog
  
  Use 'noop' mode where Puppet runs in a no-op or dry-run mode. This
  
  is useful for seeing what changes Puppet will make without actually
  
  executing the changes.
  
* --execute:        #执行一段puppet代码
  
  Execute a specific piece of Puppet code
  
* --test:        #启用测试
  
  Enable the most common options used for testing. These are 'verbose',
  
  'detailed-exitcodes' and 'show_diff'.
  
* --verbose:        #打印详细执行过程
  
  Print extra information.
  
* --catalog:#catalog
  
  Apply a JSON catalog (such as one generated with 'puppet master --compile'). You can
  
  either specify a JSON file or pipe in JSON from standard input.
  
* --write-catalog-summary        #编译完catalog后,将资源列表和类列表保存到节点。
  
  After compiling the catalog saves the resource list and classes list to the node
  
  in the state directory named classes.txt and resources.txt
  
EXAMPLE
  
-------
  
    $ puppet apply -l /tmp/manifest.log manifest.pp
  
    $ puppet apply --modulepath=/root/dev/modules -e "include ntpd::server"
  
    $ puppet apply --catalog catalog.json
  
AUTHOR
  
------
  
Luke Kanies
  
COPYRIGHT
  
---------
  
Copyright (c) 2011 Puppet Labs, LLC Licensed under the Apache 2.0 License

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-544862-1-1.html 上篇帖子: Puppet cert命令参数介绍(四) 下篇帖子: Puppet module命令参数介绍(六)
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表