hercules-team/augeasproviders — pull request #63 by raphink (2013-12-02 15:36:56+00:00)
Title: Add an apache_directive type and provider

## apache_directive provider

This is a custom type and provider supplied by `augeasproviders`.

### manage simple entry

apache_directive { "SetEnv":
args => ["SPECIAL_PATH", "/foo/bin"],
ensure => present,
}

### delete entry

apache_directive { "SetEnv":
args => ["SPECIAL_PATH"],
ensure => absent,
}

### manage entry in another config location

apache_directive { "SetEnv":
args => ["SPECIAL_PATH", "/foo/bin"],
ensure => present,
target => "/etc/httpd/conf.d/app.conf",
}

### set a value in a given context

apache_directive { 'StartServers for mpm_prefork_module':
ensure => present,
name => 'StartServers',
args_params => 0,
context => 'IfModule[arg="mpm_prefork_module"]',
args => 4,
}

The `StartServers` directive is unique per scope, which means no arg is taken to identify it uniquely. For this reason, we set `args_params` to `0`.

The directive is nested in the context of the `mpm_prefork_module` module, so we specify this with the `context` parameter.

The value of `StartServers` for the `mpm_prefork_module` module will be set/updated to `4`. Note that the `IfModule` entry will not be created if it is missing.