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

How to use conditional operation in augeas puppet

I can insert/edit any attributes or any text in XML file. Is it possible to insert/edit any attributes or any text in XML File. For eg: I would like to change the value of a property, If it is named as "modcluster.proxylist".
ArunRaj
  • 1,780
  • 2
  • 26
  • 48
0
votes
1 answer

How to intepret or analyze the Augeas error for domain.xml of Jboss EAP

I have tried to add a new attribute in the extensions element in domain.xml ( Jboss EAP ).
ArunRaj
  • 1,780
  • 2
  • 26
  • 48
0
votes
1 answer

unable to print augeas for own configuration

I have below dtp.conf file for internal requirement. /opt/dtp/etc/dtp.conf export CHO='NON-PROD' but when I print the config file via augtool unable to print the value /opt/pupet/bin/augtool augtool> print /files/opt/dtp/etc/dtp_config augtool>
Puppeteer
  • 63
  • 1
  • 7
0
votes
1 answer

puppet augeas resource only support avalialbe lenses

I am automating rhnplugin config file in puppet, below is my manifests augeas { 'config' : lens => 'Simplevars.lns', incl => '/etc/yum/pluginconf.d/rhnplugin.conf', changes => 'set /etc/yum/pluginconf.d/rhnplugin.conf/test " " ' …
Puppeteer
  • 63
  • 1
  • 7
0
votes
2 answers

best way to write a puppet manifest for adding Linux auto.misc entries without overwriting the existing config lines

I am currently writing a puppet module for adding lines to auto.misc file. I used augeas for adding a new entry to the auto.misc file and I came up with like something below and it works quite well every time I run without duplicating. augeas {…
peedee
  • 1,941
  • 2
  • 14
  • 14
0
votes
1 answer

modfying default ss directive using augeas

I am trying to modify directory directive apache file using augeas in a puppet manifest: Apache file extract: Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from…
nad
  • 1
0
votes
2 answers

How to fix Augeas dependency for Tomcat manifest?

I've the following puppet manifest which suppose to install and run Tomcat on port 8983: # tomcat.pp package { [ "tomcat7", "tomcat7-admin" ]: ensure => present } package { [ "augeas-tools", "libaugeas-dev", "libaugeas-ruby" ]: ensure => installed…
kenorb
  • 155,785
  • 88
  • 678
  • 743
0
votes
1 answer

How to declare particular line in file (/etc/fstab) with Augeas?

I'm trying to use Augeas to declare/ensure that a particular mount point exists in fstab. If it already is there, make sure it has these $settings, otherwise create a new line that does. But I haven't been able to get augeas to do that. I can get it…
Peter V. Mørch
  • 13,830
  • 8
  • 69
  • 103
0
votes
1 answer

Can't use augeas to create a new entry in hosts.allow

I try to create a new entry in hosts.allow augeas { "Add in hosts allow" : context => '/files/etc/hosts.allow', changes => [ 'ins 01 after *[last()]', 'set 01/process[1] ssh', 'set 01/process[2] ssh2', …
Michael Courcy
  • 627
  • 2
  • 6
  • 13
0
votes
1 answer

Is there any hope of parsing csv-like file with augeas?

I am trying to build a lens that would parse a file with the format #header1 header2 header3 valA1 valA2 valA3 valB1 valB2 valB3 I'd the result to resemble the following tree: root +--[1] | +----header1 -> valA1 | +----header2 ->…
Adam Ryczkowski
  • 7,592
  • 13
  • 42
  • 68
0
votes
1 answer

Is there an augeas lens, that can edit perl hash like in .gitolite.rc?

I want to edit the gitolite3`s configuration file, which is written in perl, and looks like that: # comments # comments %RC = ( # ------------------------------------------------------------------ # comments UMASK …
Adam Ryczkowski
  • 7,592
  • 13
  • 42
  • 68
0
votes
1 answer

Augeas memcached edit via puppet

I am trying to make a change to my memcached.conf file via Augeas with puppet. I have this in my manifest file: augeas { 'listen_on_IP': context => '/etc/memcached.conf', changes => ['set l 0.0.0.0'], } but I see no changes. I'm using…
Erik
  • 7,479
  • 8
  • 62
  • 99
0
votes
1 answer

It's possible combinate augeas & template?

It's possible combinate augeas & template?. The objective its a static part of test inside a file an another variable with the augeas. I'm reading the documentation and examples but I think its not possible. If its possible, can you put an…
runouri
  • 3
  • 2
0
votes
2 answers

augeas & puppet & whitespace

I try to edit the file limits.com with puppet. I need to add lines this files. I copy the example from: http://docs.puppetlabs.com/guides/augeas.html # /etc/puppet/modules/limits/manifests/conf.pp define limits::conf ( $domain = "root", $type =…
runouri
  • 3
  • 2
0
votes
1 answer

Modifying ssh_config with augtool

This is the default /etc/ssh/ssh_config, which contains #ForwardX11 no, which I would like to change, so I do augtool set "/files/etc/ssh/ssh_config/ForwardX11" yes which fails, but this adds ForwardX11 yes after the Host * augtool set…
Jasmine Lognnes
  • 6,597
  • 9
  • 38
  • 58