[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[augeas-devel] Re: puppet provder not executing

Bryan Kearney <bkearney redhat com> writes:

> Micah Anderson wrote:
>> I've got an augeas puppet definition for a new logrotate snippet, there
>> currently is no /etc/logrotate.d/sympa, but I wish to create one with
>> augeas. This works fine with augtool, however, puppet isn't applying it,
>> nor am I seeing any info about why not. This is using puppet 0.24.8rc1.
>> The puppet chunk is:
>> augeas {
>>     "logrotate_sympa":
>>       context => "/files/etc/logrotate.d/sympa/rule",
>>       changes => [ "set file /var/log/sympa/*.log", "set rotate 3",
>> "set schedule weekly",
>>                    "set compress compress", "set missingok missingok",
>>                    "set ifempty notifempty",
>>                    "set copytruncate copytruncate" ]
>> }
>> Running puppet with debug tells me:
> The context is used to prepend part of the path to each line. My guess
> is you do not want to set the context here, because what you are
> saying is:
> set /files/etc/logrotate.d/sympa/rule/file to /var/log/sympa/*.log
> set /files/etc/logrotate.d/sympa/rule/rotate to 3
> etc...

I'm confused, because this is what I want to be saying, as this example
from augtool demonstrates:

augtool> set /files/etc/logrotate.d/sympa/rule/file /var/log/sympa/*.log
augtool> set /files/etc/logrotate.d/sympa/rule/rotate 3
augtool> set /files/etc/logrotate.d/sympa/rule/schedule weekly
augtool> save
augtool> quit
# cat /etc/logrotate.d/sympa
/var/log/sympa/*.log {
                     rotate 3
> My guess is these 2 sets effect differnt files. I would ditch the
> context (or just set it to files).

If I ditch the context, then I need to write each change as longhand,
like so:

augeas {
         changes => [
         "set /files/etc/logrotate.d/sympa/rule/file
         "set /files/etc/logrotate.d/sympa/rule/rotate 3",
         "set /files/etc/logrotate.d/sympa/rule/schedule weekly"

Unless I misunderstand the point of the context?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]