I want to create a directory that will contain NFS mount points.  
Therefore, it makes
sense to have it in place before any of the NFS-related Puppet stuff.  I 
can do it
in either of two ways.

1. In a manifest, with a regular file resource, which contains the line

          before => Class['nfs'],

No problem there.   

2. If I try to do this via a lookup of equivalent Hiera data, I see
    something unusual - or maybe just something I don't understand properly.

If my Hiera data looks like this:

 '/primary':
    ensure: 'directory'
    mode:   '0755'
    owner: 'root'
    group: 'root' 
    before: 'Class[nfs]'

 - I get an error when I run the agent on the node: "Server Error: Invalid 
relationship: 
File[/primary] { before => Class[nfs] }, because Class[nfs] doesn't seem to 
be in the catalog".

But if I change "nfs" to "Nfs" - i.e .capitalize the first letter of the 
class *name*,
it works.

I get that resource references should always be capitalized
(require => File['/etc/sysctl.d/recommended.conf']  and so on), but what is 
going on with
the necessity for capitalizing the resource _name_ - "Nfs" in my example - 
when
trying to accomplish the job via lookup and Hiera?

Thanks for any enlightenment,

Stephen Kenny
School of Computer Science
Trinity College
Dublin 
Ireland

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/2f41b686-c41c-470f-a8a4-be07d1f5f854%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to