Ask Your Question


asked 2018-09-03 07:20:30 -0600

dmccabe7 gravatar image

updated 2018-11-06 08:18:50 -0600

Hi, I am trying to get roles/profiles working for the first time, so any guidance is appreciated

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::{::role} for (file: /etc/puppetlabs/code/environments/production/manifests/site.pp, line: 3, column: 3) on node Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run



version: 5

  - name: "Per-node data (yaml version)"
    path: "nodes/%{::trusted.certname}"
  - name: "Per-node roles (yaml version)"
    path: "roles/%{::role}}"
  - name: "Common and fallback data"
    path: "common.yaml"

  data_hash: yaml_data


node default {
 if $::role {
  #include "role::{::web}"
   include "role::{::role}"

 } else {
  include profile::base
  notify { "Node ${::fqdn} has no role set.": }


class role::default {
 include profile::base


class role::web {
 include profile::base
 include profile::lamp

[root@testpuppet ~]# facter -p role
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-09-12 05:25:05 -0600

jesse gravatar image

The include function call in your site.pp looks to be the problem:

node default { 
  if $::role {
    include "role::{::web}"

Instead try:

node default { 
  if $::role {
    include "role::${::role}"
edit flag offensive delete link more


Hi, I just updated my code above in line with this. Still getting the same error. any thoughts?. Thanks

dmccabe7 gravatar imagedmccabe7 ( 2018-11-06 08:19:33 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-09-03 07:20:30 -0600

Seen: 469 times

Last updated: Nov 06