Closed raphink closed 9 years ago
@raphink what about a new provider for file
type that inherits from posix
provider instead of a new resource type? We could then use something like this:
file { '/etc/foo':
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
source => 'file:///usr/share/doc/foo/examples/foo.conf',
provider => 'augeas',
}
# Either this syntax
augeas { 'foo bar':
context => '/files/etc/foo.conf':
changes => 'set bar baz',
}
# Or this one
augeas { 'foo d':
incl => '/etc/foo.conf',
lens => 'Foo.lns',
changes => 'set foo d',
}
Hijacking the file
resource type is really kind of complex. For now, I prefer to keep that separated.
This feature has been implemented.
Now that we have a working PoC, which is mono-resource and replaces augeas/augeasproviders, it would be better to be able to plug with them instead, something like this: