Learning VM Roles and Profiles issue

asked 2018-09-21 12:20:34 -0500

theillien gravatar image

I am trying to complete the Roles and Profiles quest on the Learning VM. However, I can't seem to get past Task 5. It says to create the role/manifests directory. I assume this is under /etc/puppetlabs/code/environments/production/modules as was the profile/ directory. In otherwords, I should have /etc/puppetlabs/code/environments/production/modules/profile and /etc/puppetlabs/code/environments/production/modules/role`.

I created the role/manifests/pasture_db.pp file and added the following:

class role::pasture::db {
  include profile::pasture::db
  include profile::motd
}

When I run the puppet job command I get the following but it failed. I then ran puppet agent on the node itself and got

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Function Call, Could not find class ::role::pasture_db for pasture-db.puppet.vm (file: /etc/puppetlabs/code/environments/production/manifests/site.pp, line: 38, column: 3) on node pasture-db.puppet.vm

Why is it looking for ::role::pasture_db rather than role::pasture_db? Did I put the directory in the wrong place?

edit retag flag offensive close merge delete

Comments

You'll need to create a 'pasture' directory under manifest directory and then create the db.pp file.

bschonecker gravatar imagebschonecker ( 2018-09-22 10:06:16 -0500 )edit