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.

Manage a file in site.pp

Manage a file in site.pp - Puppet Tutorial

From the course: Learning Puppet (2017)

Start my 1-month free trial

Manage a file in site.pp

- [Instructor] We should be ready now to write some code in github, deploy it to your puppet server, and then run the puppet agent to enforce that code on your system. To begin with, we'll just write our code in a file called site.pp. Later, we'll add more abstraction and move this code into another place. To create the file in github, just click create new file. Github will automatically create directories if they don't exist. So enter the directory name manifests. Followed by slash, and then site.pp. Site.pp is where the puppet master first looks for configuration details about a system when the puppet agent checks in. Since you only have one node at the moment, your puppet master, we can just use the node default declaration. That looks like this: node, default, then a curly brace, and then closing curly brace. To create a file on the system, you'll need to declare a file resource. For now we'll just create an empty file in the root directory called readme. I'll type file, an open…

Contents