Ask Your Question


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

dmccabe7 gravatar image

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::{::web} for (file: /etc/puppetlabs/code/environments/production/manifests/site.pp, line: 4, column: 3) on node


version: 5 defaults:

hierarchy: - 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"

defaults: data_hash: yaml_data


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

} 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 web

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

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

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

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 -0500

Seen: 330 times

Last updated: Sep 03