52859/what-are-resources-in-puppet
Resources are the fundamental unit for modeling system configurations.
Each resource describes the desired state for some aspect of a system, like a specific service or package. When Puppet applies a catalog to the target system, it manages every resource in the catalog, ensuring the the actual state matches the desired state.
Resources contained in classes and defined types share the relationships of those classes and defined types.
Resources are not subject to scope: a resource in any area of code can be referenced from any other area of code.
A resource declaration adds a resource to the catalog and tells Puppet to manage that resource's state.
Resource declarations
At minimum, every resource declaration has a resource type, a title, and a set of attributes:
<TYPE> { '<TITLE>':
<ATTRIBUTE> => <VALUE>, }
The resource title and attributes are called the resource body. A resource declaration can have one resource body or multiple resource bodies of the same resource type.
Resource declarations are expressions in the Puppet language — they always have a side effect of adding a resource to the catalog, but they also resolve to a value.The value of a resource declaration is an array of resource references, with one reference for each resource the expression describes.
Below is an example of a user resource declaration:
user { 'Sam': ensure => present, uid => '100', gid => '100', shell => '/bin/bash', home => '/home/Sam' }
Wrapper classes that use multiple component modules ...READ MORE
Classes in Puppet are introduced using the ...READ MORE
A module can be defined as a ...READ MORE
Here's a list of commands that you ...READ MORE
Hey @nmentityvibes, you seem to be using ...READ MORE
Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE
It can work if you try to put ...READ MORE
When you use docker-compose down, all the ...READ MORE
Commands that are used to sign the ...READ MORE
Puppet supports several kinds of plug-ins: Custom facts ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.