- Puppet 5 Essentials(Third Edition)
- Martin Alfke Felix Frank
- 184字
- 2021-07-02 18:22:22
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.
推薦閱讀
- TypeScript Essentials
- Deploying Node.js
- Spring 5企業(yè)級開發(fā)實戰(zhàn)
- JavaScript高效圖形編程
- Python GUI Programming Cookbook
- 精通Scrapy網(wǎng)絡(luò)爬蟲
- WordPress Plugin Development Cookbook(Second Edition)
- Java 11 Cookbook
- 飛槳PaddlePaddle深度學習實戰(zhàn)
- 自制編程語言
- 快人一步:系統(tǒng)性能提高之道
- Python圖形化編程(微課版)
- Scala Data Analysis Cookbook
- Essential C++(中文版)
- Spring MVC+MyBatis開發(fā)從入門到項目實踐(超值版)