官术网_书友最值得收藏!

Dry testing your manifest

Another useful command-line switch for puppet apply is the --noop option.
It instructs Puppet to refrain from taking any action on unsynced resources.
Instead, you only get a log output that indicates what will change without the switch. This is useful in determining whether a manifest would possibly break anything on your system:

root@puppetmaster:~# puppet apply puppet_service.pp --noop
Notice: Compiled catalog for puppetmaster.example.net in environment production in 0.63 seconds
Notice: /Stage[main]/Main/Service[puppet]/enable: current_value true, should be false (noop)
Notice: Class[Main]: Would have triggered 'refresh' from 1 events
Notice: Stage[main]: Would have triggered 'refresh' from 1 events
Notice: Applied catalog in 0.06 seconds
The output format is the same as before, with a ( noop) marker trailing the notice about the sync action. This log can be considered a preview of what will happen when the manifest is applied without the --noop switch.

The additional notices about triggered refreshes will be described later, and can be ignored for the moment. You will have a better understanding of their significance after finishing this chapter and Chapter 4, Combining Resources in Classes and Defined Types.

主站蜘蛛池模板: 宁夏| 微山县| 日喀则市| 商河县| 大余县| 吴江市| 岚皋县| 岑巩县| 潼关县| 洛隆县| 兴山县| 青浦区| 东丰县| 阳泉市| 玉屏| 社会| 武威市| 库尔勒市| 湟中县| 武冈市| 松原市| 临泉县| 天气| 紫金县| 耿马| 松江区| 普格县| 沛县| 孟津县| 犍为县| 静乐县| 太仓市| 石狮市| 竹山县| 曲水县| 五原县| 霍州市| 宁晋县| 通榆县| 饶河县| 太谷县|