Ask Your Question

Hiera lookup troubles

asked 2013-09-12 10:42:26 -0600

PorkCharSui gravatar image

I want to have a hiera file in which I maintain a list of possible mount points with there attributes, options and a list of hostnames on which they should get mounted. My yaml looks like this:


    ensure: mounted
    atboot: yes
    device: /some/dev/  
    mountpoint: /home
    fstype: nfs4
      - sec=krb5i
      - rsize=32768
      - wsize=32768
      - clientaddr=123.456.789.012
    dump: 0
    pass: 0
      - some.hostname
      - another.hostname

I shoot the yaml data into the class like this:


node 'somenode' {
  include stdlib
  class { 'mounts':
    mounts_hash => hiera_hash('mounts'),

My module manifest looks like this ... (more)

edit retag flag offensive close merge delete


Possibly not related, but I wonder about mounting /some/dev as NFS4.

Rob Ogilvie gravatar imageRob Ogilvie ( 2013-09-12 11:47:06 -0600 )edit

I just entered something, because it isn't relevant. It's actually more like hostname:/mount

PorkCharSui gravatar imagePorkCharSui ( 2013-09-13 03:41:37 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2013-09-13 03:41:30 -0600

andreas gravatar image

updated 2013-09-13 03:42:03 -0600

I could reproduce the behaviour that mount only uses the first option of the array. Passing a string to the options attribute works as expected. In your hiera file, that would be:

options: "sec=krb5i,rsize=32768,wsize=32768,clientaddr=123.456.789.012"
edit flag offensive delete link more


Thanks Andreas for your reply. That would solve this problem indeed. Yet I still would like to know why it doesn't work the other way. I'm trying to ...(more)

PorkCharSui gravatar imagePorkCharSui ( 2013-09-13 04:15:36 -0600 )edit

I think it's not hiera but the mount type. Its options attribute is handled as a scalar, not as an array (but I'm just guessing, I don't ...(more)

andreas gravatar imageandreas ( 2013-09-13 04:28:34 -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



Asked: 2013-09-12 10:42:26 -0600

Seen: 135 times

Last updated: Sep 13 '13