Take a look at the last paragraph here: 
http://docs.puppetlabs.com/puppet/3/reference/lang_variables.html#assignment

$role = 'nameserver'

assigns a variable within the 'role::nameserver' namespace (allowed), while 

$::role = 'nameserver'

assigns a top level variable (not allowed). 

Eric

On Thursday, August 22, 2013 6:04:39 AM UTC-5, JeremyCampbell wrote:
>
> We're trying to set a role variable in one of our role classes i.e.
>
> class role::nameserver {
>   
>   $::role = 'nameserver'
>
>   include profile::baseline
> }
>
> however we get the following error
>
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> Could not parse for environment production: Cannot assign to variables in 
> other namespaces
>
> We do not get the error if we just use
>
>  $role = 'nameserver'
>
> Does anyone understand what is causing this?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to