From 7ce3190986cf8e5fe037a7ccd4c1076505b117f4 Mon Sep 17 00:00:00 2001 From: Micah Date: Tue, 12 Jul 2016 16:41:59 -0400 Subject: remove submodules in preparation for move to subrepos Change-Id: Ia7655153b556337f676e3d909559c4a7306bedd6 --- puppet/modules/sysctl | 1 - 1 file changed, 1 deletion(-) delete mode 160000 puppet/modules/sysctl (limited to 'puppet/modules/sysctl/manifests/config.pp') diff --git a/puppet/modules/sysctl b/puppet/modules/sysctl deleted file mode 160000 index 975852b7..00000000 --- a/puppet/modules/sysctl +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 975852b7acc1125b4cd9d4d490b9abd8d31217e6 -- cgit v1.2.3 From a75fea409bf8e62e55ba341672c202aab5fa480e Mon Sep 17 00:00:00 2001 From: Micah Date: Tue, 12 Jul 2016 16:46:31 -0400 Subject: git subrepo clone https://leap.se/git/puppet_sysctl puppet/modules/sysctl subrepo: subdir: "puppet/modules/sysctl" merged: "975852b" upstream: origin: "https://leap.se/git/puppet_sysctl" branch: "master" commit: "975852b" git-subrepo: version: "0.3.0" origin: "https://github.com/ingydotnet/git-subrepo" commit: "1e79595" Change-Id: Ica1925ea414df32850d0358ae17d6c704ae6fa7d --- puppet/modules/sysctl/manifests/config.pp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 puppet/modules/sysctl/manifests/config.pp (limited to 'puppet/modules/sysctl/manifests/config.pp') diff --git a/puppet/modules/sysctl/manifests/config.pp b/puppet/modules/sysctl/manifests/config.pp new file mode 100644 index 00000000..79ddd295 --- /dev/null +++ b/puppet/modules/sysctl/manifests/config.pp @@ -0,0 +1,18 @@ +define sysctl::config ($value, $comment) { + + include sysctl + + augeas { "sysctl_${name}": + context => '/files/etc/sysctl.conf', + changes => [ "set ${name} ${value}", "insert #comment before ${name}", + "set #comment[last()] '${comment}'" ], + onlyif => "get ${name} != ${value}", + notify => Exec["sysctl_${name}"], + } + + exec { "sysctl_${name}": + command => '/sbin/sysctl -p', + subscribe => File['/etc/sysctl.conf'], + refreshonly => true, + } +} -- cgit v1.2.3