On Wed, Sep 4, 2013 at 12:16 AM, Ian Mortimer <[email protected]> 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
_______________________________________________ augeas-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/augeas-devel
