Questions tagged [augeas]

Augeas is a configuration file API.

Filter by
Sorted by
Tagged with
0
votes
0answers
36 views

remove comment from apache cfg file with augeas

How do I get augeas to remove the comment from an apache config file? This is very close but I'm having trouble understanding it. I'm not following how the line "defvar kerncomment" works and how it ...
1
vote
1answer
83 views

Modify server in /etc/ntp.conf with one-liner?

In /etc/ntp.conf would I like to change all servers to just server ntp.example.com in just one command line. I can do it with ssh like so augtool --autosave --noautoload --transform "ssh incl /etc/...
1
vote
0answers
171 views

Is there any way to tell the Puppet augeas resource which encoding to use?

i am new to augeas, and i am getting plenty of errors like: Could not evaluate: invalid byte sequence in UTF-8 in special i expect augeas to honor the encoding declaration in a XML-file <?xml ...
1
vote
1answer
250 views

Commenting out or removing an @include from /etc/pam.d/sshd with augtool

How can I either comment out or remove the "@include common-auth" line in /etc/pam.d/sshd? The default content is: ... # Standard Un*x authentication. @include common-auth ... The lens ...
1
vote
2answers
639 views

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 ...
2
votes
1answer
1k views

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 ...
0
votes
1answer
272 views

Augeas error “unexpected LIDENT, expecting UIDENT”

I am trying to implement a new lens based on another one. All I have done so far is to copy the lens in /usr/share/augeas/lenses/dist, changed its filename and the "module" name in the file itself to "...
3
votes
1answer
557 views

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 ...
0
votes
1answer
1k views

Augeas augtool for Java property files

I try to adjust a Java properties file with augeas and can't really get it to work even though my usecase seems very straight forward. I do have a Neo4j server (on Ubuntu 14.04 - installed from the ...
1
vote
2answers
1k views

How to append to the same variable with augeas run via puppet?

I have the following resource declaration to set the setenv.sh file via augeas in puppet. augeas {'test': lens => 'Properties.lns', incl => '/tmp/setenv.sh', changes => "...
2
votes
1answer
598 views

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'} -...
0
votes
1answer
284 views

How to read/ modify freetds.conf (for ODBC) using augtool or similar in bash script?

How can I get augtool (augeas) or a similarly common tool to work with freetds.conf, so I can automate some configuration in a bash install script? This doesn't seem to work: augtool print "/files/...
1
vote
2answers
1k views

Configuring PAM with Augeas

I am attempting to use Augeas to configure the files in my /etc/pam.d directory in a default Ubuntu 14.04 install. My goal is to find all nodes that have an argument of either 'nullok' or '...
1
vote
2answers
2k views

Puppet Augeas with /etc/hosts

I'm fairly new to Augeas, but I've been told it is the tool for modifying config with puppet. I'm trying to create a simple class that adds a line to /etc/hosts if it doesn't already exist. ...
4
votes
2answers
696 views

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; ...
3
votes
1answer
831 views

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[.= '...
2
votes
2answers
324 views

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 /...
0
votes
1answer
3k views

Puppet augeas fails on insert with lens and incl specified

The augeas insert command is throwing an error if I specify a lens and incl in the resource. I haven't really been able to find anyone with a similar problem. When I include the following resource it ...
4
votes
2answers
548 views

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 ...
1
vote
1answer
94 views

How to ignore the rest of a file in Augeas?

I'm working with a set of config files and I need a way to only cherry pick out certain entries when defining an Augeas lens. How do I effectively state "if what Augeas sees isn't already listed ...
0
votes
1answer
89 views

Parenthesis around value with Augeas lens?

How can I create an Augeas lens that will allow me to extract a value field from within a parenthesis? Background: I'm starting an Augeas lens for managing NASL files for OpenVAS. I need to be able ...
1
vote
1answer
733 views

Augeas edit option if it exist, add otherwise - while referencing newly created node

I want to do something along the lines of: set /files/etc/exports/dir[. = '/export/home'][client = '10.0.0.0/8'] /export/home set /files/etc/exports/dir[. = '/export/home'][client = '10.0.0.0/8']/...
3
votes
1answer
2k views

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 ...
5
votes
1answer
2k views

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 ...
2
votes
2answers
1k views

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/...
0
votes
1answer
67 views

Managing mailman configuration with augeas

I want to create an augeas lens to modify mailman lists. The lists are stored in a binary file which can be exported to a plaintext file using config_list -o /tmp/config my_list and reimported by ...
2
votes
2answers
842 views

How can I use Puppet/Augeas to manage exim dc_local_interfaces configuration?

I need to set the value for "dc_local_interfaces" to "127.0.0.1;::1", but the semi-colon prevents this. This is my definition in Puppet: augeas { "/etc/exim4/update-exim4.conf.conf": lens => ...
0
votes
1answer
396 views

Augeas tasks are shown as changed, although the file wasn´t changed

I have installed puppet-dashboard and noticed that all my augeas tasks are shown as "changed". I would expect that augeas automatically checks wether the value to be set is already set and in such ...
1
vote
1answer
148 views

How to copy a branch in augeas

Is there a ready way to copy a branch natively in augeas or via the puppet augeas handler? If the copy operator were natively available in augeas it would be something like cp /files/etc/grub.conf/...
1
vote
1answer
555 views

Representing a multiline value in Augeas using '\'

I recently assembled a lens in Augeas and now it's not functioning quite as desired. My file contains a few references with the following syntax: Value1 = KEY 32 OR\ KEY 33 OR\ .... How do I ...
1
vote
1answer
1k views

Augeas - create new ini section

I have a config file in augeas using a custom lens that outputs the data as follows. /files/opt/../server.conf/target[1] = "general" /files/opt/../server.conf/target[1]/serverName = "XXX" /files/opt/...
3
votes
1answer
1k views

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 ...
4
votes
2answers
366 views

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?
1
vote
1answer
2k views

Using Augeas to modify Squid configuration

I'm running squid-deb-proxy and I want to alter the configuration using Puppet/Augeas. When I try this: augeas {'squid-deb-proxy.conf': lens => 'Squid.lns', incl => '/etc/squid-...
1
vote
1answer
1k views

How to set the string “value;othervalue” in php.ini with augeas?

i want to change the session.save_path in the php.ini with augeas default: session.save_path="/var/lib/php5" target value session.save_path="3;/var/lib/php5sessions" augeas returns quite ...
7
votes
2answers
13k views

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 ...
7
votes
2answers
3k views

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': ...