Skip to main content

Questions tagged [augeas]

Augeas is a configuration file API.

Filter by
Sorted by
Tagged with
0 votes
1 answer
232 views

Puppet/Augeas -- ins command worked on RH6, fails on RH7

I have this construct in my puppet module to add a line in /etc/sudoers after the last "Defaults" line: augeas { "sudoers.ssh_auth_sock" : lens => "Sudoers.lns", ...
hymie's user avatar
  • 424
2 votes
1 answer
282 views

How to set value of ipa_hostname directive in sssd.conf using Augeas

Using Puppet versions Master: puppetserver 6.7 Client: puppet-agent 6.10 I have other Augeas code in other modules that works just fine. Example sssd.conf [sssd] services = nss, sudo, pam, ssh ...
Phil's user avatar
  • 151
0 votes
1 answer
132 views

Using Augeas Nginx lens to add value to a server_name directive

What I have currently : server { listen 80; server_name www.lala.com lala.com; location / { proxy_set_header Host $http_host; proxy_set_header X-Forwarded-Host $...
André Luís Lopes's user avatar
1 vote
1 answer
218 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/...
Jasmine Lognnes's user avatar
1 vote
0 answers
394 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 ...
mmoossen's user avatar
  • 119
1 vote
1 answer
550 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 ...
Ates Goral's user avatar
2 votes
2 answers
1k 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 ...
alfonso's user avatar
  • 73
2 votes
1 answer
2k 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 ...
bioShark's user avatar
  • 123
0 votes
1 answer
568 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 "...
Larsen's user avatar
  • 343
3 votes
1 answer
751 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 ...
Vladimir Hraban's user avatar
0 votes
1 answer
2k 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 ...
pagid's user avatar
  • 127
1 vote
2 answers
2k 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 => "...
kaizenCoder's user avatar
2 votes
1 answer
1k 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'} -&...
kenorb's user avatar
  • 6,827
0 votes
1 answer
425 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/...
Oleg Pryadko's user avatar
1 vote
2 answers
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 '...
user7560's user avatar
1 vote
2 answers
3k 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. ...
Matt's user avatar
  • 69
4 votes
2 answers
1k 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; ...
Aaron Copley's user avatar
  • 12.7k
2 votes
1 answer
1k 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[.= '...
Ian's user avatar
  • 376
2 votes
2 answers
455 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 /...
CodeGnome's user avatar
  • 285
0 votes
1 answer
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 ...
user228289's user avatar
4 votes
2 answers
835 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 ...
Larsen's user avatar
  • 343
1 vote
1 answer
122 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 ...
Tim Brigham's user avatar
  • 15.6k
0 votes
1 answer
109 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 ...
Tim Brigham's user avatar
  • 15.6k
1 vote
1 answer
862 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']/...
Jon Skarpeteig's user avatar
3 votes
1 answer
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 ...
Red Cricket's user avatar
5 votes
1 answer
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 ...
roehrijn's user avatar
  • 223
2 votes
2 answers
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/...
Radek Hladík's user avatar
0 votes
1 answer
73 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 ...
krissi's user avatar
  • 3,447
2 votes
2 answers
936 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 => ...
Larsen's user avatar
  • 343
0 votes
1 answer
462 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 ...
Larsen's user avatar
  • 343
1 vote
1 answer
167 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/...
Tim Brigham's user avatar
  • 15.6k
1 vote
1 answer
743 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 ...
Tim Brigham's user avatar
  • 15.6k
1 vote
1 answer
2k 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/...
Tim Brigham's user avatar
  • 15.6k
3 votes
1 answer
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 ...
Tim Brigham's user avatar
  • 15.6k
4 votes
2 answers
381 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?
seaquest's user avatar
  • 698
1 vote
1 answer
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-...
dty's user avatar
  • 293
1 vote
1 answer
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 ...
c33s's user avatar
  • 1,545
7 votes
2 answers
14k 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 ...
quanta's user avatar
  • 51.9k
7 votes
2 answers
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': ...
larsks's user avatar
  • 45.5k