agentk wrote:
> I'm not sure if I'm kicking tyres again, but first off: I like the
> possibilities with puppet + augeas.
> 
> Trying to make a working example with /etc/exports but not sure of how
> to proceed. I want to be able to define exports in the following form:
> 
> my_exports_def {
>   ['/home/server01', '/svr/logs']:
>     client => '*.example.com',
>     options => 'rw,sync',
>   '/other/export':
>     client => '*.example.com',
>     options => 'rw,sync,no_root_squash',
> }
> 

Try something like this:

augeas{"test":
         context=>"/files/etc/exports",
         changes => ["set /dir[.='/home/server01'] '/home/server01'",
                     "set /dir[.='/home/server01']/client '*.example.com'",
                     "set 
/dir[.='/home/server01']/client[.='*.example.com']/option[.='rw'] rw"]

}

The commands work in augtool. The iteration may be an issue if you have 
many options. Perhaps you can set that up in a wrapper call and use 
conditionals?

-- bk



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to