-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Puppet 8 for DevOps Engineers
By :

In this section, we will talk about some resource features you will find documented and useable with Puppet but that this book strongly recommends you do not use and make it part of your best practices to avoid. The resource features we highlight here are powerful but make resource declarations harder to read and require more translation and calculations required to see the state we are attempting to get the server into.
An abstract resource type is used for declaring a resource when we do not want to predefine a type and may decide which resource we will use based on the client. In this simple example, a variable is set to the type and the resource is then declared using the Resource[<TYPE>] { <RESOURCE
BODY>}
syntax:
$selectedtype = exec resource[$mytype] { "/bin/echo 'don't use this' > /tmp/badidea": creates => /tmp/badidea , }
A simple translation of this statement would be as follows:
...