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.
Get the order right - Puppet Tutorial
From the course: Learning Puppet (2017)
Get the order right
- [Narrator] Because Puppet is a language for modeling desired state, the order of code in your manifest might not be the order it's executed by puppet. To be sure we need to add some ordering to the resources. We can do this by adding what are called meta-parameters. For now we'll just focus on two, before and require. Let's look at our code. That's in sight, minecraft, manifests, inet.pp. Our class is actually laid out in a reasonable order, so this should be fairly easy. Puppet will by default use manifest ordering. But with more complex modules you really need to be explicit in defining these relationships. We could add a before parameter to the first file resource. But directories are a special case. And Puppet will always create a directory before a file within that directory. But we do want to make sure that the jar file exists before the server is started. So let's add a relationship there. I'll edit the file. And I'll go down to the jar file and here I'll add 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.