[augeas-devel] Fwd: Issues with automounter lens
Raphaël Pinson
raphael.pinson at camptocamp.com
Tue Sep 3 22:33:00 UTC 2013
On Wed, Sep 4, 2013 at 12:16 AM, Ian Mortimer <i.mortimer at uq.edu.au> wrote:
> On 03/09/13 23:12, Patrick Spinler wrote:
>
> That's unfortunate, since I'd like to use this a puppet recipe, and I
>> don't know when I invoke this whether or not the option exists when I
>> invoke it. I'm not even sure whether the entry exists. All I know is
>> that I want this entry, and I want it in this specific form.
>>
>
> The only way I've found to get around this, is to have two augeas
> resource settings in puppet. One to ins and set the value if it
> doesn't exist and a second that just sets the value.
>
> The first needs an onlyif clause so it doesn't run if the entry already
> exists. The second must be scheduled after the first with either
> require or -> chaining.
>
>
That is one way indeed. This other way, which I would prefer, is to write a
type/provider, using the augeasproviders API (see augeasproviders.com).
--
Raphaël Pinson
Infrastructure Developer & Trainer
+33 479 26 57 93
+33 781 90 00 79
Camptocamp France
Savoie Technolac
BP 352
48, avenue du Lac du Bourget
73372 Le Bourget du Lac, Cedex
www.camptocamp.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20130904/2d3a8ad6/attachment.htm>
More information about the augeas-devel
mailing list