- 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.
推薦閱讀
- Spring Cloud Alibaba微服務架構設計與開發實戰
- 從程序員到架構師:大數據量、緩存、高并發、微服務、多團隊協同等核心場景實戰
- GitLab Repository Management
- PHP 編程從入門到實踐
- Windows Server 2012 Unified Remote Access Planning and Deployment
- Java性能權威指南(第2版)
- C語言程序設計
- Python數據分析從0到1
- Yii Project Blueprints
- Solr Cookbook(Third Edition)
- Learning Node.js for .NET Developers
- Qt 4開發實踐
- 會當凌絕頂:Java開發修行實錄
- Node.js 6.x Blueprints
- INSTANT LESS CSS Preprocessor How-to