Ask Your Question

hiera with fiddyspence/sysctl

asked 2015-02-16 15:38:23 -0600

EricL gravatar image

Hi, I've installed fiddyspence-sysctl and I'm trying to make it work within my existing Hiera setup, which I know is working, just not with this module so far for me.


 - yaml
 :datadir: /etc/puppet/environments/%{environment}/data
 - "node/%{::fqdn}"
 - "roles/%{role}"
 - common


 - ntp
 - sysctl
ntp::driftfile: "/var/lib/ntp/FOOdrift"
 ensure: 'present'
 permanent: true
 value: 0
 ensure: 'present'
 permanent: true
 value: 2

The ntp driftfile value is in there so I can verify that the value is correctly read and then set by the agent on the node matching this role (it is). But I've tried various configurations of the sysctl parameter name and values. I get no errors, and nothing is done on my agent either. The catalog runs and does nothing. Hiera on the command line gives me this:

# hiera sysctl::fs.suid_dumpable role=prod environment=ENV
{"value"=>2, "ensure"=>"present", "permanent"=>true}

# hiera sysctl::kernel.core_uses_pid role=prod environment=ENV
{"ensure"=>"present", "value"=>0, "permanent"=>true}

I'm stumped, and guessing that I'm missing something fundamental here. Would appreciate any help.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-02-20 13:01:32 -0600

GregLarkin gravatar image

As far as I know, you cannot automatically bind Hiera data to this sysctl resource without using an intermediate wrapper class. I think you might be able to if the sysctl module provided a defined type, but looking at the code, it's implemented as a pure Ruby type and provider.

edit flag offensive delete link more


Thank you very much for your help and support. This makes more sense to me now.

EricL gravatar imageEricL ( 2015-02-20 14:34:03 -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: 2015-02-16 15:38:23 -0600

Seen: 1,085 times

Last updated: Feb 20 '15