From the course: Learning Puppet (2017)

Unlock the full course today

Join today to access over 22,700 courses taught by industry experts or purchase this course individually.

Expand site.pp

Expand site.pp - Puppet Tutorial

From the course: Learning Puppet (2017)

Start my 1-month free trial

Expand site.pp

- [Instructor] Now that we've got our additional nodes to manage, we'll need to ask definitions to site.pp. It's possible to add definitions similar to the one we just created for the master, but there are more dynamic options. We can use regular expressions to match the names so we can establish a naming convention for those nodes and site.pp will pick up additional nodes matching that pattern. Let's start by opening up the site.pp. That's under manifests, site.pp, and then click the edit button. For our example, we'll create a rule for nodes that start with the string web. To do that, we'll use the word node here again, and then we'll use two forward slashes to define a regular expression. And in between those, I'm going to use the carrot character, and this just means the beginning of the line. It'll match the beginning of the line and then whatever comes after that. And then I can just say web. Now technically…

Contents