[augeas-devel] augeasproviders_sysctl usage help

Dave Green dave.green at sword-apak.com
Mon May 21 14:50:15 UTC 2018


Hi

I'm trying to use your module to control sysctl settings thought puppet, and to be honest I'm struggling. Not sure if it's specifically how I'm using your module, or the fact that I am not passing hash values to it (I'm very new to perl and puppet).

This is my init.pp code

        $sysctlkeys = keys($sysctl_settings)
        rh7config::sysctlconfig  $sysctlkeys:
            porthash => $sysctl_settings


And the sysctlconfig definition looks like this...

define rh7config::sysctlconfig ($porthash)
sysctl  $porthash[$name]:
                ensure => present,
                value  => $porthash[$name][val],
                target => "/usr/lib/sysctl.d/00-system.conf",



The parameter sysctl_settings (defined as a hash as I want to set several sysctl values) is set to

net.ipv4.tcp_keepalive_time:
  val: 3600

but I am receiving the following error when puppet checks in on the host

Error: /Stage[main]/Rh7config/Rh7config::Sysctlconfig[net.ipv4.tcp_keepalive_time]/Sysctl["val"=>3600]: Could not evaluate: Error: `"val"=>3600` is not a valid sysctl key

I'm not sure if it the code I'm using to pass the hash value or the syntax of the parameter which is incorrect. Any help you could give me would be very gratefully received

Regards
Dave



Dave Green
Technical Consultant
Sword Apak
www.sword-apak.com<http://www.sword-apak.com>

d +44 1454 871120
t +44 1454 871000
f +44 1454 871199
e dave.green at sword-apak.com<mailto:dave.green at sword-apak.com>

Nibley Court
3 Turner Drive
Westerleigh Business Park
Bristol
BS37 5YX. United Kingdom
www.sword-group.com<http://www.sword-group.com>


Apak Group Limited, Registered in England No. 01451033.
Registered Office: Nibley Court, 3 Turner Drive, Westerleigh Business Park, Bristol, BS37 5YX.


The information contained in this message or any of its attachments may be privileged and confidential and intended for the exclusive use of the addressee.  The views expressed may not be Apak policy but the personal views of the originator.  If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy.  This footnote also confirms that this email has been swept for the presence of known computer viruses before being sent.



Dave Green
Technical Consultant
Sword Apak
www.sword-apak.com

d +44 1454 871120
t +44 1454 871000
f +44 1454 871199
e dave.green at sword-apak.com

Nibley Court
3 Turner Drive
Westerleigh Business Park
Bristol
BS37 5YX. United Kingdom
www.sword-group.com


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20180521/c6090bf3/attachment.htm>


More information about the augeas-devel mailing list