You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Based on https://github.com/puppetlabs/puppet-docs/blob/1a13be3fc6981baa8a96ff832ab090abc986830e/lib/puppet_references/puppet/type_strings.rb#L19-L99
> **NOTE:** This page was generated from the Puppet source code on <%=now%>
11
+
12
+
## List of resource types
13
+
14
+
15
+
<%types.eachdo |type| -%>
16
+
* [<%=type%>](./<%=type%>.md)
17
+
<%end-%>
18
+
19
+
20
+
## About resource types
21
+
22
+
### Built-in types and custom types
23
+
24
+
This is the documentation for Puppet's built-in resource types and providers. Additional resource types are distributed in Puppet modules.
25
+
26
+
You can find and install modules by browsing the
27
+
[Puppet Forge](http://forge.puppet.com). See each module's documentation for
28
+
information on how to use its custom resource types. For more information about creating custom types, see [Custom resources](/docs/puppet/latest/custom_resources.html).
29
+
30
+
> As of Puppet 6.0, some resource types were removed from Puppet and repackaged as individual modules. These supported type modules are still included in the `puppet-agent` package, so you don't have to download them from the Forge. See the complete list of affected types in the [supported type modules](#supported-type-modules-in-puppet-agent) section.
31
+
32
+
### Declaring resources
33
+
34
+
To manage resources on a target system, declare them in Puppet
35
+
manifests. For more details, see
36
+
[the resources page of the Puppet language reference.](/docs/puppet/latest/lang_resources.html)
37
+
38
+
You can also browse and manage resources interactively using the
39
+
`puppet resource` subcommand; run `puppet resource --help` for more information.
40
+
41
+
### Namevars and titles
42
+
43
+
All types have a special attribute called the _namevar_. This is the attribute
44
+
used to uniquely identify a resource on the target system.
45
+
46
+
Each resource has a specific namevar attribute, which is listed on this page in
47
+
each resource's reference. If you don't specify a value for the namevar, its
48
+
value defaults to the resource's _title_.
49
+
50
+
**Example of a title as a default namevar:**
51
+
52
+
```puppet
53
+
file { '/etc/passwd':
54
+
owner => 'root',
55
+
group => 'root',
56
+
mode => '0644',
57
+
}
58
+
```
59
+
60
+
In this code, `/etc/passwd` is the _title_ of the file resource.
61
+
62
+
The file type's namevar is `path`. Because we didn't provide a `path` value in
63
+
this example, the value defaults to the title, `/etc/passwd`.
64
+
65
+
**Example of a namevar:**
66
+
67
+
```puppet
68
+
file { 'passwords':
69
+
path => '/etc/passwd',
70
+
owner => 'root',
71
+
group => 'root',
72
+
mode => '0644',
73
+
}
74
+
```
75
+
76
+
This example is functionally similar to the previous example. Its `path`
77
+
namevar attribute has an explicitly set value separate from the title, so
78
+
its name is still `/etc/passwd`.
79
+
80
+
Other Puppet code can refer to this resource as `File['/etc/passwd']` to
81
+
declare relationships.
82
+
83
+
### Attributes, parameters, properties
84
+
85
+
The _attributes_ (sometimes called _parameters_) of a resource determine its
86
+
desired state. They either directly modify the system (internally, these are
87
+
called "properties") or they affect how the resource behaves (for instance,
88
+
adding a search path for `exec` resources or controlling directory recursion
89
+
on `file` resources).
90
+
91
+
### Providers
92
+
93
+
_Providers_ implement the same resource type on different kinds of systems.
94
+
They usually do this by calling out to external commands.
95
+
96
+
Although Puppet automatically selects an appropriate default provider, you
97
+
can override the default with the `provider` attribute. (For example, `package`
98
+
resources on Red Hat systems default to the `yum` provider, but you can specify
99
+
`provider => gem` to install Ruby libraries with the `gem` command.)
100
+
101
+
Providers often specify binaries that they require. Fully qualified binary
102
+
paths indicate that the binary must exist at that specific path, and
103
+
unqualified paths indicate that Puppet searches for the binary using the
104
+
shell path.
105
+
106
+
### Features
107
+
108
+
_Features_ are abilities that some providers might not support. Generally, a
109
+
feature corresponds to some allowed values for a resource attribute.
110
+
111
+
This is often the case with the `ensure` attribute. In most types, Puppet
112
+
doesn't create new resources when omitting `ensure` but still modifies existing
113
+
resources to match specifications in the manifest. However, in some types this
114
+
isn't always the case, or additional values provide more granular control. For
115
+
example, if a `package` provider supports the `purgeable` feature, you can
116
+
specify `ensure => purged` to delete configuration files installed by the
117
+
package.
118
+
119
+
Resource types define the set of features they can use, and providers can
120
+
declare which features they provide.
121
+
122
+
## Puppet 6.0 type changes
123
+
124
+
In Puppet 6.0, we removed some of Puppet's built-in types and moved them into individual modules.
125
+
126
+
### Supported type modules in `puppet-agent`
127
+
128
+
The following types are included in supported modules on the Forge. However, they are also included in the `puppet-agent` package, so you do not have to install them separately. See each module's README for detailed information about that type.
The following types are contained in modules that are maintained, but are not repackaged into Puppet agent. If you need to use them, you must install the modules separately.
The following types were deprecated with Puppet 6.0.0. They are available in modules, but are not updated. If you need to use them, you must install the modules separately.
0 commit comments