Augeas : how to set a string value containing spaces ?

1,364 views
Skip to first unread message

Rino

unread,
Oct 9, 2009, 11:55:32 AM10/9/09
to Puppet Users
Hi,

We've run into a problem with augeas while trying to update a netwok
configuration file :
for instance, we would like to set "ETHTOOL_OPTS" to "autoneg on" but
the result is
ETHTOOL_OPTS=autoneg in the file (the " on" part is not written).

Is there a way to escape the space to get the correct result ?
(we've tried several things but none has worked so far)

Thanks,
Renaud

David Lutterkort

unread,
Oct 9, 2009, 5:34:47 PM10/9/09
to puppet...@googlegroups.com

You'll get to use a lot of quotes in your puppet manifest; I _think_
something along the lines of

augeas { foo:
context => ...,
changes => "set ETHTOOL_OPTS \"'autoneg on'\""
}

should do the trick. The outer double quotes are stripped by puppet when
it reads the manifest, the inner double quotes are stripped by the
augeas type when it parses the changes, leaving the single quotes in the
value that gets passed to augeas.

David


Reply all
Reply to author
Forward
0 new messages