Questions tagged [augeas]

Augeas is a configuration editing tool. It parses configuration files in their native formats and transforms them into a tree. Configuration changes are made by manipulating this tree and saving it back into native config files.

Augeas - a configuration API

Augeas is a configuration editing tool. It parses configuration files in their native formats and transforms them into a tree. Configuration changes are made by manipulating this tree and saving it back into native config files.

Augeas is:

  • An API provided by a C library
  • A command line tool to manipulate configuration from the shell (and shell scripts)
  • Language bindings to do the same from your favorite scripting language
  • Canonical tree representations of common configuration files
  • A domain-specific language to describe configuration file formats

Augeas goals:

  • Manipulate configuration files safely, safer than the ad-hoc techniques generally used with grep, sed, awk and similar mechanisms in scripting languages
  • Provide a local configuration API for Linux
  • Make it easy to integrate new config files into the Augeas tree

More at http://augeas.net/.

87 questions
0
votes
1 answer

puppet, augeas and properties lens: file not saved because no difference detected

I want to edit a java properties file using puppet and augeas. I'm using this code which seems to be correct but actually this do not modify the file. $disabledalgo = "SSLv3, RC4, MD5withRSA, DH keySize < 768, EC keySize < 224" $incl =…
Baptiste Mille-Mathias
  • 2,144
  • 4
  • 31
  • 37
0
votes
1 answer

Augeas resource not applying changes to config. file

I'm testing some config changes with Augeas, and I can see Puppet picking up the changes but they're not actually applied to disk: Notice: Augeas[db-connection](provider=augeas): --- /opt/myconfigfile.xml 2017-09-11 11:56:18.072779400…
NA1985
  • 33
  • 7
0
votes
1 answer

Can't figure out how to properly add onlyif in augeas

I have the following xml:
aRTURIUS
  • 1,230
  • 2
  • 13
  • 31
0
votes
1 answer

Iterated lens leads to 'ambiguous tree iteration'

While writing a lens for Deckard tests I ran into a problem. This lens let eol = ws . ((del /[;#]/ ";" . [label "#comment" . store /[^\n]*/] . del_str "\n") | (del_str "\n"))* . del_str "\n" results in this error: $ augparse…
balast
  • 33
  • 5
0
votes
2 answers
0
votes
1 answer

How Navigate XML with augeas xml

I have a very strange xml file that i need to update using augeas. colour
Vash
  • 13
  • 2
0
votes
1 answer

augeas in puppet does not change file

I want to manage the contents of the carbon.conf file using Augeas from Puppet. I have used Augeas before in Puppet for managing an xml file and that worked great. However this time when the puppet catalog is applied, nothing happens to the…
Harm Doedens
  • 35
  • 1
  • 8
0
votes
1 answer

Trouble using augeas for /etc/fstab in Puppet

I am pretty sure I have some syntax error in this class that has one augeas resource in it. Here is my code: # # This class was created to deal with /etc/fstab on openstack nodes # class myfstab ( $spec = 'uig003:/uig003/uig003_OSC_vol003A', #…
Red Cricket
  • 9,762
  • 21
  • 81
  • 166
0
votes
1 answer

How do I create new xml nodes in a given position using augeas in puppet?

I'm trying to use puppet to edit the weblogic config.xml file for finalizing the SSL configuration part. Below the starting weblogic config.xml file: AdminServer
ferp
  • 1
  • 1
0
votes
1 answer

How to use Setm with some condition

I would like to change one property name ( "modcluster.proxylist" ) with setm Command and with constraint in Puppet. Following code is not checking my constraint. Any help is much appreciated. Following is my Source XML which i would like to change.…
ArunRaj
  • 1,780
  • 2
  • 26
  • 48
0
votes
0 answers

parse_failed error occured in augeas,why this error occur and how to fix this issue?

I want to edit file "myfileDB.properties" using augeas. so used Properties.lns. but it made error "parse_failed"and some time "parse_skel_failed". explain the root cause of this error and solve this issue. augtool> print…
0
votes
1 answer

Augeas: How to match dash?

Want to write a lens for duply-exclude Files. Example: + /etc - / So my lens looks like this: module DuplyExclude = let nl = del /[\n]+/ "\n" let entry = [ label "entry" . [ label "op" . store /(\+|-)/ ] . del /[ \t]+/ " " . [ label "path" .…
michi.0x5d
  • 959
  • 9
  • 13
0
votes
0 answers

Cannot see /etc/shadow in augeas

I am kind of new to Augeas and am trying to get a handle on it. i was hoping to manipulate local accounts using augeas but cannot parse the /etc/shadow file. I am using Augeas version 1.0.0 on CentOS 6. I see there are newer versions but cannot make…
Phil
  • 306
  • 2
  • 10
0
votes
1 answer

Puppet: configuring with augeas a set of [keys:values] via create_resources from hiera

I am trying to create an interface to pseudo-loop over a set of keys:values from my hiera yaml to update a config file with augeas define augeas_config ( $key, $value ) { augeas{ "/var/MYCONF/MYCONF.def": lens =>…
THX
  • 553
  • 2
  • 8
  • 18
0
votes
1 answer

How to dynamically iterate XML Element in Augeas

I would like to iterate all the child elements in the XML. Is it possible to iterate dynamically ? In other words, I would like to check / edit all the nested elements without knowing the last element number. For eg: In the following "server-groups"…
ArunRaj
  • 1,780
  • 2
  • 26
  • 48