From the course: Learning Puppet (2017)

Unlock the full course today

Join today to access over 23,400 courses taught by industry experts.

Roles and profiles

Roles and profiles

- [Instructor] In addition to the modules from the Forge, you'll want to make some of your own modules. You can put these inside a directory called site in the root of your control-repo. The first two modules we'll create in the site directory are our roles and profiles. The roles and profiles pattern is a best practice for keeping your Puppet code organized. Profile are the building blocks of your configuration. Remember all that complex code in the ReadMe of the NGINX module on the Forge? That kind of code would go in a profile. You define a profile as a wrapper for a subset of configuration. Profiles should be limited to a single unit of configuration, like the NGINX web server. If you're managing a database, that configuration would go in another profile. Roles define the business role of a machine. There should be only one role per machine, and roles should be made up only of profiles. This keeps your configuration simple and composable. A role should be the answer to the simple…

Contents