Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Commit

Permalink
Update to Augeas systcl module
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonio Romero Marin committed Mar 2, 2017
1 parent e6bb53c commit 9913cb9
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 10 deletions.
7 changes: 4 additions & 3 deletions .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ fixtures:
stdlib:
repo: "git://github.com/puppetlabs/puppetlabs-stdlib.git"
ref: 4.7.0
sysctl:
repo: "git://github.com/fiddyspence/puppet-sysctl.git"
ref: 1.1.0
augeasproviders_sysctl:
repo: "git://github.com/hercules-team/augeasproviders_sysctl.git"
augeasproviders_core:
repo: "git://github.com/hercules-team/augeasproviders_core.git"
symlinks:
swap_file: "#{source_dir}"
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ group :test do
gem 'rspec', '~> 2.0'
end

gem 'public_suffix', '1.4.6' if RUBY_VERSION < '2.0.0'
gem 'rake'
gem 'puppet-lint'
gem 'rspec-puppet', :git => 'https://github.com/rodjek/rspec-puppet.git'
Expand Down
5 changes: 2 additions & 3 deletions manifests/swappiness.pp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
validate_integer($swappiness, 100, 0)

sysctl { 'vm.swappiness':
ensure => 'present',
permanent => true,
value => $swappiness,
ensure => 'present',
value => $swappiness,
}

}
8 changes: 6 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,12 @@
"version_requirement": ">= 4.7.0"
},
{
"name": "fiddyspence/sysctl",
"version_requirement": "1.1.0"
"name": "herculesteam/augeasproviders_sysctl",
"version_requirement": ">=2.1.0"
},
{
"name": "herculesteam/augeasproviders_core",
"version_requirement": ">=2.1.0"
}
]
}
1 change: 0 additions & 1 deletion spec/classes/swappiness_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
it do
is_expected.to contain_sysctl('vm.swappiness').
with({"ensure"=>"present",
"permanent"=>"true",
"value"=>"65"})
end
end
3 changes: 2 additions & 1 deletion spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
puppet_module_install(:source => proj_root, :module_name => 'swap_file')
hosts.each do |host|
shell('puppet module install puppetlabs-stdlib --version 4.7.0', { :acceptable_exit_codes => [0] })
shell('puppet module install fiddyspence-sysctl --version 1.1.0', { :acceptable_exit_codes => [0] })
shell('puppet module install herculesteam/augeasproviders_core --version 2.1.0', { :acceptable_exit_codes => [0] })
shell('puppet module install herculesteam/augeasproviders_sysctl --version 2.1.0', { :acceptable_exit_codes => [0] })
end
end
end

0 comments on commit 9913cb9

Please sign in to comment.