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
12
votes
4 answers

How to set config=value in php.ini with Puppet?

I'm doing my first steps in Puppet and ran into a problem. I've installed PHP on a Linux server and I want to do some slightly changes to php.ini file. I don't want to overwrite the whole ini file with one from repository, just change/create one…
mibutec
  • 2,929
  • 6
  • 27
  • 39
6
votes
0 answers

Using augeas with puppet to add an attribute to a root node

So I'm trying to do something that looks identical to the question at "Issues adding attribute to XML root node via augeas", but the answer provided there doesn't work for me. Without the insert command, I'm getting this error message (in puppet…
6
votes
1 answer

Create or update a section in XML file with Augeas

I would like to update a section in an XML config file or add a new one if does not exist already using Augeas. The XML file looks like this: ...
PapelPincel
  • 4,255
  • 6
  • 39
  • 49
5
votes
4 answers

Augeas support on my Vagrant machine?

I'm trying to getting support for augeas on my Vagrant machine. I tried to install some package with these directives: package { "augeas-tools": ensure => installed } package { "libaugeas-dev": ensure => installed } package { "libaugeas-ruby":…
Francesco Casula
  • 26,184
  • 15
  • 132
  • 131
4
votes
1 answer

Augeas in Puppet for mysql config failing

I'm currently developing some basic Puppet manifests and modules to install my application dependencies after my server has been deployed. It's a suite of basic stuff: - OS -> Ubuntu 14.04 LTS Nginx PHP5-FPM MySQL Simple, right? Everything is…
jellis
  • 160
  • 1
  • 11
3
votes
2 answers

How to use augtool without a lense?

augtool Augeas seams to be a popular program for Puppet to modify config files, but how do I modify a config file where augtool doesn't have a lense for? E.g.: [Desktop Entry] Type=Application Encoding=UTF-8 Name=Compiz Exec=compiz NoDisplay=false #…
Jasmine Lognnes
  • 6,597
  • 9
  • 38
  • 58
3
votes
1 answer

How do I create nicely formatted xml using augeas in puppet?

I'm trying to use puppet to edit the jenkins config.xml. I have decided augeas makes the most sense for various reasons, and I nearly have what I need, but the formatting is pretty rough. This is my puppet file: augeas { 'jenkins_config.xml' : …
Josh Gagnon
  • 5,342
  • 3
  • 26
  • 36
3
votes
1 answer

How to change property value with augeas which position changes in XML?

I have the following problem: my XML (simplified): USERNAME blabla
Dakkar
  • 5,682
  • 5
  • 22
  • 28
2
votes
1 answer

Perl module Config::Augeas with xs won't install on Big Sur

On my iMac with Catalina (10.15.6), I installed the augeas brew package and then installed the perl module "Config::Augeas" without issue. On Big Sur, I have not had the same success. After installing the brew package and then doing "cpanm…
StevieD
  • 6,925
  • 2
  • 25
  • 45
2
votes
1 answer

modify centos firewalld zone file with augeas loses indentation

I'm trying to modify a centos firewalld zone file using augeas and the xml lens. The default public zone file looks like: Public For use in public areas. You do not trust…
SimonH
  • 964
  • 6
  • 17
2
votes
2 answers

Modifying yml file in augeas

I am trying to modify/set /etc/elasticsearch/elasticsearch.yml file in puppet manifest through augeas resource but it is not working. Can someone explain what lens file i should specify ? and Whether i need to install something extra for this or the…
Ijaz Ahmad
  • 11,198
  • 9
  • 53
  • 73
2
votes
1 answer

How to use setm in puppet

I would like to change a one property name ( "modcluster.proxylist" ) with setm Command in Puppet. My following code is not working. Any help is much appreciated. augeas { "jboss_domain_config": incl => "/opt/domain.xml", …
ArunRaj
  • 1,780
  • 2
  • 26
  • 48
2
votes
1 answer

Augeas: How to shorten tree paths?

My first Augeas script looks something like: set /augeas/load/Properties/lens Properties.lns set /augeas/load/Properties/incl /firstapp/WEB-INF/classes/some.properties load set /files/firstapp/WEB-INF/classes/some.properties/PROPERTY_1 "VALUE A" set…
Jens Piegsa
  • 7,399
  • 5
  • 58
  • 106
2
votes
1 answer

Puppet Augeas - cannot update value in xml node containing CDATA

I have an xml document similar to this:
xorinzor
  • 6,140
  • 10
  • 40
  • 70
2
votes
2 answers

how to update existing or create new XML node with Augeas

For the following XML: bar I can update exiting entry with attribute "foo" with the following augeas command: set /files/test.xml/properties/entry[#attribute/key='foo']/#text bar2 Is there…
fruitJuice
  • 1,281
  • 2
  • 11
  • 22
1
2 3 4 5 6