From the course: Learning Puppet (2017)
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Built-in resource types - Puppet Tutorial
From the course: Learning Puppet (2017)
Built-in resource types
- [Instructor] Let's talk about the most basic building block of Puppet code, the resource. Resources are a way of defining a specific unit of configuration. For example, a file or a system user would be a single resource. This is an example of a file resource declaration. There are a few important things to know. First, there's this line. This is the name of the resource declaration. For file resources, this name is also the full path to the file you're managing. The name, or name var line, as it's sometimes called, should end with a colon after the quote. The next line is the first parameter of the resource. In this case, we're telling Puppet to ensure that this is a file. Other options in this case are directory or link. You could also set a resource type to ensure absent, which will delete the file. The syntax for assigning parameters uses the equal sign followed by the greater than symbol to form a kind of arrow pointing right. Sometimes this symbol is called a hash rocket. The…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.