Set up your prerequisites

If you're new to using roles and profiles, do some additional setup before writing any new code.

  1. Create two modules: one named role, and one named profile.

    If you deploy your code with Code Manager or r10k, put these two modules in your control repository instead of declaring them in your Puppetfile, because Code Manager and r10k reserve the modules directory for their own use.

    1. Make a new directory in the repo named site.
    2. Edit the environment.conf file to add site to the modulepath. (For example: modulepath = site:modules:$basemodulepath).
    3. Put the role and profile modules in the site directory.
  2. Make sure Hiera or Puppet lookup is set up and working, with a hierarchy that works well for you.