DB service resource

We'll build our own custom DB type for this simple use case. It will allow us to pass values from our database to our WordPress application. This simple example ensures that the type is named db, marks it as a service resource, and provides five available parameters to the database service resource. This file is placed in lib/puppet/type/db.rb:

# lib/puppet/type/db.rb# Adding :is_capability to the custom type marks the resources as service resourcesPuppet::Type.newtype :db, :is_capability => true do  newparam :name, :is_namevar => true  newparam :user  newparam :password  newparam :port  newparam :hostend

Get Mastering Puppet 5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.