- 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.
推薦閱讀
- 觸·心:DT時代的大數據精準營銷
- Visual Basic程序開發(學習筆記)
- 無代碼編程:用云表搭建企業數字化管理平臺
- PHP 7底層設計與源碼實現
- Spring Boot+Spring Cloud+Vue+Element項目實戰:手把手教你開發權限管理系統
- C語言程序設計案例式教程
- Bootstrap Essentials
- Reactive Android Programming
- Java項目實戰精編
- PyQt編程快速上手
- WordPress Search Engine Optimization(Second Edition)
- Learning TypeScript
- R語言:邁向大數據之路
- KnockoutJS Blueprints
- Swift從入門到精通 (移動開發叢書)