Puppet can manage entire files as static content, but it can also use templates. Learn the basics of the epp template format and manage a config file in your Minecraft module.
- [Lecturer] In order to set the install directory…we need our minecraft.service file…to be dynamically generated.…Templates allow you to be more flexible…in how your text files are defined.…And you can use things like facts, variables and parameters…to change the output.…First we'll copy the contents of…the minecraft.service module.…So I'll go to site, minecraft, files, minecraft.service…and I'll just select this and copy it.…Then I want to paste this into a template…so I'll go back to the root of my module…and then create a new file called templates…minecraft.service.epp.…
And then I'm going to paste the contents…of the service file.…eep is the puppet template format.…And puppet also supports ruby erb style templates…but they can be a bit more confusing.…The eep syntax is pretty simple.…We can just go in and replace this install directory…with an epp tag.…So we'll start with a less than symbol,…and a parentheses, then the equal sign.…Then we'd say $install_dir which is the variable…name we'll be using, then a percent and a greater than.…
Author
Updated
10/7/2019Released
11/13/2017- What is Puppet?
- Setting up a Puppet master and control repo
- Using the built-in resource types
- Organizing code with roles and profiles
- Managing more nodes
- Triggering actions (orchestration)
- Gathering system info with facter
- Writing modules
- Using templates
Skill Level Beginner
Duration
Views
Related Courses
-
DevOps Foundations
with Ernest Mueller2h 53m Beginner -
DevOps Foundations: Infrastructure as Code
with Ernest Mueller2h 6m Intermediate
-
Introduction
-
Welcome1m 22s
-
-
1. Puppet Overview
-
What is Puppet?4m 9s
-
-
2. Setting Up a Dev Environment
-
Create a sandbox2m 51s
-
Install your Puppet master6m 38s
-
Version control2m 46s
-
Set up a control repo5m 32s
-
-
3. First Steps with Puppet
-
Built-in resource types2m 16s
-
Manage a file in site.pp5m 39s
-
Classes1m 38s
-
The NGINX module5m 27s
-
Editing the Puppetfile1m 23s
-
Roles and profiles1m 33s
-
Roles and profiles demo5m 57s
-
-
4. Managing More Nodes
-
Manage more nodes5m 41s
-
Expand site.pp2m 28s
-
Orchestration in Puppet3m 38s
-
Understand the Puppet run1m 34s
-
Facter5m 5s
-
-
5. Modules
-
What is a module?3m 15s
-
Get the order right3m 35s
-
Use parameters3m 44s
-
Templates3m 39s
-
-
Conclusion
-
Next steps3m 49s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Templates