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

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.

主站蜘蛛池模板: 聂荣县| 定陶县| 桓台县| 枝江市| 绥中县| 清新县| 吐鲁番市| 崇左市| 南皮县| 东安县| 额尔古纳市| 密云县| 芒康县| 崇礼县| 申扎县| 玛曲县| 赤峰市| 尼勒克县| 贵溪市| 禹州市| 新密市| 休宁县| 固始县| 田阳县| 江陵县| 闽清县| 陵川县| 花莲市| 广河县| 田林县| 梁山县| 鄄城县| 陆河县| 平武县| 长垣县| 宽甸| 易门县| 南漳县| 内丘县| 宁陕县| 彭州市|