Skip to content

Commit

Permalink
Merge branch 'next'
Browse files Browse the repository at this point in the history
Conflicts:
	lib/augeasproviders/mounttab/fstab.rb
	lib/augeasproviders/mounttab/vfstab.rb
	lib/puppet/provider/augeasprovider/default.rb
	lib/puppet/provider/host/augeas.rb
	lib/puppet/provider/mailalias/augeas.rb
	lib/puppet/provider/mounttab/augeas.rb
	lib/puppet/provider/pam/augeas.rb
	lib/puppet/provider/pg_hba/augeas.rb
	lib/puppet/type/pam.rb
	metadata.json
	spec/fixtures/unit/puppet/provider/sysctl/augeas/broken
	spec/lib/augeas_spec/fixtures.rb
	spec/unit/puppet/provider/augeasprovider/default_spec.rb
	spec/unit/puppet/provider/host/augeas_spec.rb
	spec/unit/puppet/provider/mailalias/augeas_spec.rb
	spec/unit/puppet/provider/mounttab/fstab_spec.rb
	spec/unit/puppet/provider/mounttab/vfstab_spec.rb
	spec/unit/puppet/provider/pam/augeas_spec.rb
	spec/unit/puppet/provider/pg_hba/augeas_spec.rb
	spec/unit/puppet/provider/puppet_auth/augeas_spec.rb
	spec/unit/puppet/provider/syslog/rsyslog_spec.rb
  • Loading branch information
raphink committed Aug 13, 2014
2 parents 7d58734 + 4459f51 commit fa92bbf
Show file tree
Hide file tree
Showing 125 changed files with 64 additions and 12,665 deletions.
32 changes: 28 additions & 4 deletions .fixtures.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,34 @@
fixtures:
repositories:
mount_providers:
repo: git://github.com/puppetlabs/puppetlabs-mount_providers.git
ref: 0.0.2
stdlib:
repo: git://github.com/puppetlabs/puppetlabs-stdlib.git
ref: 4.1.0
augeasproviders_core:
repo: git://github.com/hercules-team/augeasproviders_core.git
augeasproviders_apache:
repo: git://github.com/hercules-team/augeasproviders_apache.git
augeasproviders_grub:
repo: git://github.com/hercules-team/augeasproviders_grub.git
mount_providers:
repo: git://github.com/puppetlabs/puppetlabs-mount_providers.git
ref: 0.0.2
augeasproviders_mounttab:
repo: git://github.com/hercules-team/augeasproviders_mounttab.git
augeasproviders_nagios:
repo: git://github.com/hercules-team/augeasproviders_nagios.git
augeasproviders_pam:
repo: git://github.com/hercules-team/augeasproviders_pam.git
augeasproviders_postgresql:
repo: git://github.com/hercules-team/augeasproviders_postgresql.git
augeasproviders_puppet:
repo: git://github.com/hercules-team/augeasproviders_puppet.git
augeasproviders_shellvar:
repo: git://github.com/hercules-team/augeasproviders_shellvar.git
augeasproviders_ssh:
repo: git://github.com/hercules-team/augeasproviders_ssh.git
augeasproviders_sysctl:
repo: git://github.com/hercules-team/augeasproviders_sysctl.git
augeasproviders_syslog:
repo: git://github.com/hercules-team/augeasproviders_syslog.git
symlinks:
augeasproviders: "#{source_dir}"
"augeasproviders": "#{source_dir}"
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 2.0.0

- Use a base type/provider with inheritance to distribute the lib
- Split lib, types and providers into separate modules

## 1.1.0

- General
Expand Down
127 changes: 11 additions & 116 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,60 +3,22 @@

# augeasproviders: alternative Augeas-based providers for Puppet

This module provides alternative providers for core Puppet types such as
`host` and `mailalias` using the Augeas configuration library. It also adds
some of its own types for new functionality.
This module provides is a meta module which gathers all official augeasproviders
modules as dependencies.
Augeasproviders modules provide alternative Augeas-based providers for Puppet
providers around config files, using the Augeas configuration library to read
and modify them.

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.

These providers will hide *all* of the Augeas commands etc., you don't need to
know anything about Augeas to make use of it.

If you want to make changes to config files in your own way, you should use
the `augeas` type directly. For more information about Augeas, see the
[web site](http://augeas.net) or the
[Puppet/Augeas](http://docs.puppetlabs.com/guides/augeas.html)
documentation.

## Types and providers

The following builtin types have an Augeas-based provider implemented:

* `host`
* `mailalias`

The following other types have a provider implemented:

* `mounttab` from [puppetlabs-mount_providers](http://forge.puppetlabs.com/puppetlabs/mount_providers)

The module adds the following new types:

* `apache_directive` for updating generic Apache HTTP Server configs
* `apache_setenv` for updating SetEnv entries in Apache HTTP Server configs
* `kernel_parameter` for adding kernel parameters to GRUB Legacy or GRUB 2 configs
* `nrpe_command` for setting command entries in Nagios NRPE's `nrpe.cfg`
* `pam` for files inside /etc/pam.d/
* `pg_hba` for PostgreSQL's `pg_hba.conf` entries
* `puppet_auth` for authentication rules in Puppet's `auth.conf`
* `shellvar` for shell variables in `/etc/sysconfig` or `/etc/default` etc.
* `sshd_config` for setting configuration entries in OpenSSH's `sshd_config`
* `sshd_config_subsystem` for setting subsystem entries in OpenSSH's `sshd_config`
* `sysctl` for entries inside Linux's sysctl.conf
* `syslog` for entries inside syslog.conf

Lots of examples are provided in the accompanying documentation (see
`docs/examples.html`) and are also published [on the web site](http://augeasproviders.com/documentation/examples.html).
If this is a git checkout, you will need to run `make` in docs/ to generate the
HTML pages.
## Requirements

Type documentation can be generated with `puppet doc -r type` or viewed on the
[Puppet Forge page](http://forge.puppetlabs.com/domcleal/augeasproviders).
Ensure both Augeas and ruby-augeas 0.3.0+ bindings are installed and working as
normal.

For builtin types and mounttab, the default provider will automatically become
the `augeas` provider once the module is installed. This can be changed back
to `parsed` where necessary.
See [Puppet/Augeas pre-requisites](http://docs.puppetlabs.com/guides/augeas.html#pre-requisites).

## Classes

Expand Down Expand Up @@ -98,76 +60,9 @@ A Hash that contains the default values used to create each resource. See *mani

All types have a augeasproviders\_`TYPE`\_hash variable, where `TYPE` is the resource type. These variables accept a Hash to define that type's resources.

## Requirements

Ensure both Augeas and ruby-augeas 0.3.0+ bindings are installed and working as
normal.

See [Puppet/Augeas pre-requisites](http://docs.puppetlabs.com/guides/augeas.html#pre-requisites).

## Installing

On Puppet 2.7.14+, the module can be installed easily ([documentation](http://docs.puppetlabs.com/puppet/2.7/reference/modules_installing.html)):

puppet module install domcleal/augeasproviders

You may see an error similar to this on Puppet 2.x ([#13858](http://projects.puppetlabs.com/issues/13858)):

Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type `kernel_parameter` 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.

## Planned

The following builtin types have Augeas-based providers planned:

* `ssh_authorized_key`
* `port`, once [#5660](http://projects.puppetlabs.com/issues/5660) is done
* `yumrepo`, once [#8758](http://projects.puppetlabs.com/issues/8758) is done

Other ideas for new types are:

* `/etc/system` types

## Compatibility

### Puppet versions

Puppet Versions | 2.7 -> 3.4 | >= 3.4 |
:---------------|:----------:|:-------:|
compatibility | **yes** | **yes** |
shared handler | no | **yes** |

### Augeas versions

Augeas Versions | 0.10.0 | 1.0.0 | 1.1.0 | 1.2.0 |
:-------------------------|:-------:|:-------:|:-------:|:-------:|
**FEATURES** |
case-insensitive keys | no | **yes** | **yes** | **yes** |
**PROVIDERS** |
apache\_directive | **yes** | **yes** | **yes** | **yes** |
apache\_setenv | **yes** | **yes** | **yes** | **yes** |
host | **yes** | **yes** | **yes** | **yes** |
kernel\_parameter (grub) | **yes** | **yes** | **yes** | **yes** |
kernel\_parameter (grub2) | **yes** | **yes** | **yes** | **yes** |
mailalias | **yes** | **yes** | **yes** | **yes** |
mounttab (fstab) | **yes** | **yes** | **yes** | **yes** |
mounttab (vfstab) | no | **yes** | **yes** | **yes** |
nrpe\_command | **yes** | **yes** | **yes** | **yes** |
pg\_hba | no | **yes** | **yes** | **yes** |
puppet\_auth | no | **yes** | **yes** | **yes** |
shellvar | **yes** | **yes** | **yes** | **yes** |
sshd\_config | **yes** | **yes** | **yes** | **yes** |
sshd\_config\_subsystem | **yes** | **yes** | **yes** | **yes** |
sysctl | **yes** | **yes** | **yes** | **yes** |
syslog (augeas) | **yes** | **yes** | **yes** | **yes** |
syslog (rsyslog) | no | **yes** | **yes** | **yes** |

## Development documentation

See docs/ (run `make`) or [augeasproviders.com](http://augeasproviders.com/documentation/).

## Issues

Expand Down
2 changes: 0 additions & 2 deletions lib/augeasproviders.rb

This file was deleted.

4 changes: 0 additions & 4 deletions lib/augeasproviders/mounttab.rb

This file was deleted.

125 changes: 0 additions & 125 deletions lib/augeasproviders/mounttab/fstab.rb

This file was deleted.

Loading

0 comments on commit fa92bbf

Please sign in to comment.