Questions tagged [augeas]

Augeas is a configuration file API.

Augeas is a configuration file API written in C. Bindings are available in many languages. In particular, the Ruby bindings are used to provide an Augeas type in Puppet.

Augeas uses bidirectional programs called "lenses" and written in a language similar to Ocaml in order to parse configuration files.

More information: * http://augeas.net

Related:

39 questions
7
votes
2 answers

How to comment out / uncomment a line in a configuration file with Augeas?

Assumming that I have the following in the /etc/syslog.conf file: # Log all kernel messages to the console. # Logging much else clutters up the screen. #kern.* /dev/console I want to change it to kern.* …
quanta
  • 50,327
  • 19
  • 152
  • 213
7
votes
2 answers

Puppet configuration using augeas fails if combined with notify

I'm having a problem with the following Puppet manifest, which is meant to enable the passwdqc pam module on a RHEL-6 system (this is using Puppet 0.25.5 and augeas 0.7.2): augeas { 'authconfig': context =>…
larsks
  • 41,276
  • 13
  • 117
  • 170
5
votes
1 answer

Multiple puppet resources which share a single config file

I'm developing a custom puppet module for managing JBoss Application Servers. I consider each application deployed on the appserver as a self-contained resource. But some of the applications need dedicated config changes in JBoss' configuration…
roehrijn
  • 213
  • 2
  • 8
4
votes
2 answers

How can I use Puppet to Enforce Local Group Membership?

Cross posting this from Ask@PuppetLabs. (There simply isn't enough traffic there.) I've seen a number of examples for adding users to %wheel with Augeas. These are all variations of the same thing; inserting a user node at the end. Quick Tip: Add…
Aaron Copley
  • 12,345
  • 5
  • 46
  • 67
4
votes
2 answers

Puppet: Run Augeas only when a specific package exists

I want to use Augeas to modify "/etc/inittab", but this should only happen when the package "sysvinit" is installed. That package is not under Puppet control (and shall not be). The "onlyif" from Augeas doesn´t seem capable of checking for anything…
Larsen
  • 305
  • 2
  • 14
4
votes
2 answers

What is the gain by using Puppet instead of Augeas itself?

Puppet uses augeas. What is the gain by using Puppet instead of Augeas itself?
seaquest
  • 668
  • 2
  • 11
  • 25
3
votes
1 answer

Puppet does not work with augeas in a multiple ruby versions environment

I am trying to make puppet work with augeas but it complains there is no augeas provider. Some googling suggested to sudo yum install augeas augtool ls /files/etc/php.ini # test it works as expected sudo yum install ruby-augeas # this is to…
3
votes
1 answer

How to `augtool` to maintain `/etc/aliases` file?

I'd like to ensure that I have the lines ... root: /dev/null greenman: /dev/null ... in my /etc/aliases file and I have been learning about augtool. I know I could do something like this with augtool ... $ sudo augtool set…
Red Cricket
  • 462
  • 2
  • 7
  • 20
3
votes
1 answer

Using the Augeas INI lens without a header

I am using the IniFile module with augeas to create a Splunk management lens. This works well for all files containing section headers like a normal INI file but there are a couple files that don't follow this scheme, just using the name=value…
Tim Brigham
  • 15,465
  • 7
  • 72
  • 113
2
votes
2 answers

python-augeas, yum update error in CentOS7

I'm coming across this error below when I run: sudo yum update Downloading packages: No Presto metadata available for base python-augeas-0.5.0-2.el7.noarch.rpm | 25 kB 00:00 Running transaction check Running transaction…
alfonso
  • 73
  • 9
2
votes
1 answer

Puppet, changing multiple properties file with augeas

I'm using puppet and augeas tool quite a lot to configure property files. My latest requirement is to apply the same fixed set of changes to quite a long list of property files. So, I would like to do it in one run, and not to write an augeas for…
bioShark
  • 123
  • 5
2
votes
1 answer

What's correct catalina_base path for Tomcat installed from the package?

I've the following manifest to configure Tomcat to use 8983 port instead: include java class { 'tomcat': install_from_source => false } tomcat::instance {'default': package_name => 'tomcat7'} -> tomcat::service {'default': use_jsvc => false,…
kenorb
  • 5,943
  • 1
  • 44
  • 53
2
votes
1 answer

augeas: insert directive after comment in httpd.conf

I'm trying to insert a ServerName directive after the corresponding comment in httpd.conf: #ServerName www.example.com:80 This fails: defvar sncomment /files/etc/httpd/conf/httpd.conf/#comment[.= 'ServerName www.example.com:80'] ins directive…
Ian
  • 366
  • 1
  • 6
2
votes
2 answers

How can I use Augeas to manage the `!includedir` directive for MySQL?

I have a MySQL configuration file with an !includedir directive. The directive seems to show up properly when the lens examines the file: $ sudo augtool print /files/etc/my.cnf | fgrep includedir /files/etc/my.cnf/!includedir =…
CodeGnome
  • 285
  • 2
  • 9
2
votes
2 answers

Extending Puppet (probably with augeas) for custom configuration format

I have a custom firewall system with our own simple configuration file. Its basically bash source defining a well known variables: SUPERACCESS="127.0.0.1 192.168.11.0/24" SERVICES="ping 80/tcp 443/tcp 22/tcp" FORWARDING=1 ..... and I would like to…
Radek Hladík
  • 600
  • 1
  • 3
  • 14
1
2 3