Skip to content

Instantly share code, notes, and snippets.

@abrader
Created April 20, 2018 13:50
Show Gist options
  • Save abrader/48bdb10174ea5a4d9efc9d3f4cce78ab to your computer and use it in GitHub Desktop.
Save abrader/48bdb10174ea5a4d9efc9d3f4cce78ab to your computer and use it in GitHub Desktop.
Review: Packt - Puppet Book - Chapter 1

Packt - Puppet Book Review


Table of contents

  • How to do it/How it works/See Also
    • Actual subsection heading?

Chapter 1

  • Page 1
  • Page 2
    • Node definition containing resource classification is an anti-pattern
      • Good example would include a role or a profile rather than a resource type
    • Reference to a book for Puppet 3
      • Is there any concern that consumers will mix information in both books badly?
  • Page 3
    • Uptime command comparison
      • Why not show output of uptime command line vs uptime facter?
        • There is value in showing the outputs first time then pushing user to be interactive
    • Variables
      • Should be mentioned variables are immutable
  • Page 4
    • puppet facts should be used
      • facter -p puppetversion yields no results
        • puppet facts | grep puppetversion does work
  • Page 7
    • Ordering vs Refresh events
      • Calling out ordering metaparameters and refresh metaparameters
        • Tends to help users understand how refresh inherits and has extra function
  • Page 9
    • NamedVirtualHost configuration file
      • Might be worth referencing Apache NamedVirtualHost docs
  • Page 11
    • Style Guide
      • Use https:/​/​puppet.​com/​docs/​puppet/​latest/​style_​guide.​html instead
  • Page 12
    • Quoting
      • Literal vs interpolated terms should be used
  • Page 13
    • Parameters
      • Trailing comments always enforced regardless of number of attributes
    • Last file resource type
      • Missing ensure directory or file
  • Page 14
    • No mention of where to retrieve PE installer
  • Page 16
    • Scaffolding
      • Should PDK be referenced this early rather than later in book
        • Teaching to use this tool early saves time later
        • Allows for consistent use of PDK throughout books
        • Avoids having to run pdk convert later
    • site.pp
      • Use of cat seems to convolute simple code entry into profile
  • Page 17
    • puppet-lint
      • Section could be covered by installing PDK and running PDK validate
  • Page 20
    • puppet module generate
      • PDK module scaffolding should be used
  • Page 21
    • package
      • package resource for memcached should not be on one line
    • file
      • ensure => file missing
      • missing single quote at end
    • resource types
      • types should have spaces between resources
  • Page 24
    • file
      • ensure => file missing
  • Page 25
  • Page 27
    • include lines
      • each class included should be on a separate line
    • cron
      • Hashrockets should line up
  • Page 28
    • Hiera
      • lookup function from reference should be used over former scope.lookup function
  • Page 29
    • Iteration
      • Style of iteration is deprecated
  • Page 37
    • Case statement
      • Basic example should be provided before example with regular expression on Page 38
  • Page 38
    • Default
      • All conditionals with an option to provide a default action should be given in examples

Overall

General concerns

  • Consistency
    • There are sections that seem to mix both old and new Puppet syntax which makes the direction of the book and this chapter confusing to the reader
    • Types
      • End of chapter 1 discusses Sensitive type but none of the other basic or abstract types
      • Usage of the various types are not discussed nor the value that is provided by declaring a type for a given attributes
  • Differentiation
    • Puppet 3/4/5
      • Page 42
        • Section on Puppet 5 changes before Puppet 4/5 changes is confusing the way it is stated on this page.
          • Feels like an entire section should be dedicated to the nuances between the various versions of Puppet users have been exposed to in the past
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment