augeasproviders_sysctl
Version information
This version is compatible with:
- Puppet Enterprise 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x
- Puppet >= 5.0.0 < 8.0.0
- Archlinux , , , , , , , ,
This module has been deprecated by its author since Jun 26th 2023.
The author has suggested puppet-augeasproviders_sysctl as its replacement.
Start using this module
Documentation
sysctl: type/provider for sysctl for Puppet
This module provides a new type/provider for Puppet to read and modify sysctl config files using the Augeas configuration library.
The advantage of using Augeas over the default Puppet parsedfile
implementations is that Augeas will go to great lengths to preserve file
formatting and comments, while also failing safely when needed.
This provider will hide all of the Augeas commands etc., you don't need to know anything about Augeas to make use of it.
Requirements
Ensure both Augeas and ruby-augeas 0.3.0+ bindings are installed and working as normal.
See Puppet/Augeas pre-requisites.
Installing
On Puppet 2.7.14+, the module can be installed easily (documentation):
puppet module install herculesteam/augeasproviders_sysctl
You may see an error similar to this on Puppet 2.x (#13858):
Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type `sysctl` at ...
Ensure the module is present in your puppetmaster's own environment (it doesn't
have to use it) and that the master has pluginsync enabled. Run the agent on
the puppetmaster to cause the custom types to be synced to its local libdir
(puppet master --configprint libdir
) and then restart the puppetmaster so it
loads them.
Compatibility
Puppet versions
Minimum of Puppet 2.7.
Augeas versions
Augeas Versions | 0.10.0 | 1.0.0 | 1.1.0 | 1.2.0 |
---|---|---|---|---|
PROVIDERS | ||||
sysctl | yes | yes | yes | yes |
Documentation and examples
Type documentation can be generated with puppet doc -r type
or viewed on the
Puppet Forge page.
manage simple entry
sysctl { "net.ipv4.ip_forward":
ensure => present,
value => "1",
}
manage entry with comment
sysctl { "net.ipv4.ip_forward":
ensure => present,
value => "1",
comment => "test",
}
delete entry
sysctl { "kernel.sysrq":
ensure => absent,
}
remove comment from entry
sysctl { "kernel.sysrq":
ensure => present,
comment => "",
}
manage entry in another sysctl.conf location
sysctl { "net.ipv4.ip_forward":
ensure => present,
value => "1",
target => "/etc/sysctl.d/forwarding.conf",
}
do not update value with the sysctl
command
sysctl { "net.ipv4.ip_forward":
ensure => present,
value => "1",
apply => false,
}
only update the value with the sysctl
command, do not persist to disk
sysctl { "net.ipv4.ip_forward":
ensure => present,
value => "1",
persist => false,
}
ignore the application of a yet to be activated sysctl value
sysctl { "net.ipv6.conf.all.autoconf":
ensure => present,
value => "1",
silent => true
}
Issues
Please file any issues or suggestions on GitHub.
Changelog
2.6.2
- Add support for augeasproviders_core 3
- Add support for puppet 7
- Fix OpenBSD support
- Fix handling of entries with the 'target' specified
- Fix bug in sysctl arguments on FreeBSD
2.6.1
- Optimize provider resource creation during prefetch to reduce system load
- Fix support for OpenBSD
2.6.0
- FreeBSD: skip read-only MIB data (GH #48)
2.5.1
- Force data read from 'sysctl -a' into ASCSII (GH #46)
2.5.0
- Add support for:
- Debian 10
- EL 8
2.4.0
- Add Archlinux support (GH #38)
- Use : as separator on FreeBSD (fix #24) (GH #30)
- Do not manage comment when persist is false (fix #29) (GH #31)
2.3.1
- Fix puppet requirement to < 7.0.0
2.3.0
- Add support for Puppet 6
- Deprecate support for Puppet < 5
- Update supported OSes in metadata.json
2.2.1
- Added support for Puppet 5 and OEL
2.2.0
- Removed Travis tests for Puppet < 4.7 since that is the most common LTS release and Puppet 3 is well out of support
- Added OpenBSD and FreeBSD to the compatibility list
- Added a :persist option for enabling saving to the /etc/sysctl.conf file
- Added the capability to update either the live value or the disk value independently
- Now use prefetching to get the sysctl values
- Updated self.instances to obtain information about all sysctl values which
provides a more accurate representation of the system when using
puppet resource
- Updated all tests
2.1.0
- Added a :silent option for deliberately ignoring failures when applying the live sysctl setting.
- Added acceptance tests
2.0.2
- Improve Gemfile
- Do not version Gemfile.lock
- Add badges to README
- Munge values to strings
- Add specs for the sysctl type
2.0.1
- Convert specs to rspec3 syntax
- Fix metadata.json
2.0.0
- First release of split module.
Dependencies
- herculesteam/augeasproviders_core (>= 2.4.0 < 4.0.0)
augeasproviders: alternative Augeas-based providers for Puppet Copyright (c) 2012-2016 Dominic Cleal and Raphaël Pinson Copyright (c) 2017-2020 Raphaël Pinson Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.