<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On Wed, Sep 4, 2013 at 12:16 AM, Ian Mortimer <span dir="ltr"><<a href="mailto:i.mortimer@uq.edu.au" target="_blank">i.mortimer@uq.edu.au</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 03/09/13 23:12, Patrick Spinler wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
That's unfortunate, since I'd like to use this a puppet recipe, and I<br>
don't know when I invoke this whether or not the option exists when I<br>
invoke it.  I'm not even sure whether the entry exists.  All I know is<br>
that I want this entry, and I want it in this specific form.<br>
</blockquote>
<br></div>
The only way I've found to get around this, is to have two augeas<br>
resource settings in puppet.  One to ins and set the value if it<br>
doesn't exist and a second that just sets the value.<br>
<br>
The first needs an onlyif clause so it doesn't run if the entry already<br>
exists.   The second must be scheduled after the first with either<br>
require or -> chaining.<span class="HOEnZb"><font color="#888888"><br>
<br></font></span></blockquote><div><br></div><div><br></div><div>That is one way indeed. This other way, which I would prefer, is to write a type/provider, using the augeasproviders API (see <a href="http://augeasproviders.com">augeasproviders.com</a>).</div>
<div><br></div><div><br></div></div>-- <br><div dir="ltr">Raphaël Pinson<div>Infrastructure Developer & Trainer</div><div>+33 479 26 57 93<div>+33 781 90 00 79</div><div><br></div><div>Camptocamp France<br>
Savoie Technolac<br>
BP 352<br>
48, avenue du Lac du Bourget<br>
73372 Le Bourget du Lac, Cedex<br>
<a href="http://www.camptocamp.com" target="_blank">www.camptocamp.com</a><br>
</div></div></div>
</div></div>