- Puppet 5 Essentials(Third Edition)
- Martin Alfke Felix Frank
- 435字
- 2021-07-02 18:22:21
Interpreting output of the puppet apply command
As you have already witnessed, the output presented by Puppet is rather verbose. As you get more experienced with the tool, you will quickly learn to spot the crucial pieces of information. Let's first take a look at the informational messages, though. Apply the service.pp manifest once more:
root@puppetmaster:~# puppet apply puppet_service.pp
Notice: Compiled catalog for puppetmaster.example.net in environment production in 0.48 seconds
Notice: Applied catalog in 0.05 seconds
Puppet took no particular action. You only get two timings: one from the compiling phase of the manifest, and the other from the catalog application phase. The catalog is a comprehensive representation of a compiled manifest. Puppet bases all its efforts concerning the evaluation and syncing of resources on the content of its current catalog.
Now, to quickly force Puppet to show you some more interesting output, pass it a one-line manifest directly from the shell. Regular users of Ruby or Perl will recognize the call syntax:
# puppet apply -e'service { "puppet": enable => true, }'
Notice: Compiled catalog for puppetmaster.example.net in environment production in 0.62 seconds
Notice: /Stage[main]/Main/Service[puppet]/enable: enable changed 'false' to 'true'
Notice: Applied catalog in 0.12 seconds.
You instructed Puppet to perform yet another change on the Puppet service. The output reflects the exact change that was performed. Let's analyze this log message:
- The Notice: keyword at the beginning of the line represents the log level. Other levels include Warning, Error, and Debug
- The property that changed is referenced with a whole path, starting with Stage[main]. Stages are beyond the scope of this book, so you will always just see the default of main here
- The next path element is Main, which is another default. It denotes the class in which the resource was declared. You will learn about classes in Chapter 4, Combining Resources in Classes and Defined Types
- Next, is the resource. You already learned that Service[puppet] is its unique reference
- Finally, enable is the name of the property in question. When several properties are out of sync, there will usually be one line of output for each property that gets synchronized
- The rest of the log line indicates the type of change that Puppet saw fit to apply. The wording depends on the nature of the property. It can be as simple as created, for a resource that is newly added to the managed system, or a short phrase, such as changed false to true
- 一步一步學Spring Boot 2:微服務項目實戰
- Testing with JUnit
- Three.js開發指南:基于WebGL和HTML5在網頁上渲染3D圖形和動畫(原書第3版)
- 軟件測試工程師面試秘籍
- 數據結構簡明教程(第2版)微課版
- 人臉識別原理及算法:動態人臉識別系統研究
- Python數據分析(第2版)
- Cybersecurity Attacks:Red Team Strategies
- Building Machine Learning Systems with Python(Second Edition)
- 智能手機APP UI設計與應用任務教程
- Scala編程實戰
- Mastering Bootstrap 4
- 軟硬件綜合系統軟件需求建模及可靠性綜合試驗、分析、評價技術
- Android 5從入門到精通
- Visual C#(學習筆記)