Displaying 20 results from an estimated 2000 matches similar to: "Augeas JSON example?"
2013 Oct 04
3
Converting augeas snippet to puppet augeas resource
(apologies in advance for the line wrap)
I have the following tidbit of augeas code, which inserts a rule into
/etc/sysconfig/iptables as the first rule of a specifically named chain;
# augtool> insert append before
"/files/etc/sysconfig/iptables/table/append[. = ''Mayo-Firewall-INPUT''][1]"
# augtool> match /files/etc/sysconfig/iptables/table/append[. =
2011 Aug 25
6
manage sudoers with augeas
Hello,
I am trying to use augeas via puppet,
augeas { "mailops":
context => "/files/etc/sudoers",
changes => [
"set spec[user = ''%mail-ops'']/user %mail-ops",
"set spec[user = ''%mail-ops'']/host_group/host ALL",
"set spec[user = ''%mail-ops'']/host_group/command[1] \"/bin/su
2012 Sep 24
7
augeas only add if doesn't exist
Hello,
I''m trying to add an entry to /etc/hosts.allow only if the entry for
''client'' (daemon) does not already exit.
In this #puppet log:
http://www.puppetlogs.com/puppet/%23puppet-2012-05-03.log.html
rodjek links a gist which should do exactly that:
https://gist.github.com/18c50d8800840696bac0
But I can''t get it to execute with augtool:
augtool> set
2011 Mar 28
2
augeas, rhel6, setm
It turns out augeas on RHEL6 is 0.7.2, which does not have ''setm'' command
available. ''setm'' is available in augeas release 0.8, which is available in
EPEL, but not available for RHEL6 (the reason is the package is already in
RHEL6, thus no package would be released in EPEL for this.
All I want to do is to put console=ttyS0 on all kernel lines in
/etc/grub.conf.
2010 Nov 19
6
augeas / sudoers
Hello everybody!
How can i create with puppet following sudoers file:
User_Alias CENTREON=apache,nagios
CENTREON ALL = NOPASSWD: /etc/init.d/nagios* restart
CENTREON ALL = NOPASSWD: /etc/init.d/nagios* reload
CENTREON ALL = NOPASSWD: /usr/bin/nagios* -v *
The problem that augeas create only last line, replacing previous one.
--
You received this message because you are subscribed to
2009 Jul 31
6
Augeas and grub.conf
Having just spent about 2 hours trying to work out how to add a
password --md5 $1$Qejy8/$.qFUuDeYL.cuSDpN1ZD.S1
line to my grub.conf I thought it would be worth sharing how I finally
got it to work.
augeas {"/boot/grub/grub.conf":
context => "/files/boot/grub/grub.conf",
changes => [ "set timeout 15",
2012 Jan 22
5
Augeas lens for zabbix agent config files?
Hi all,
I''m trying to come up with a lens for the zabbix agent config files. I
find the lens language untransparent at best, so I''m struggeling to
figure out what''s up. The debugging possibilities are extremely
limited. Here''s what I have now:
zabbix.aug:
====
(**
An adjusted copy of the postfix_main module
**)
module Zabbix_agent =
autoload xfm
2009 Dec 14
4
Provider Augeas not functional on Sles10?
Hi,
I have a problem with augeas, puppet and Suse 10 SP2.
Augeas works when I use the augtool to edit files. But I would like to
use it in combination with puppet. My class looks something like this:
augeas {"sysctl.conf":
provider => "augeas",
context => "/files/etc/sysctl.conf",
changes => [
"set
2010 Oct 06
3
Using Augeas to manage /etc/network/interfaces from Puppet
Hi,
Sorry for the broad distribution, I''m not sure who best can help me.
I''m trying to add a new interface stanza to /etc/network/interfaces.
With augtool, I can accomplish this with the following:
set /files/etc/network/interfaces/iface[last()+1] bond1
set /files/etc/network/interfaces/iface[last()]/family inet
set /files/etc/network/interfaces/iface[last()]/method dhcp
set
2012 Jan 11
5
augeas error: Could not evaluate: unknown error - Failed to initialize Augeas
Hi,
I am running puppet 2.6.12 on a SLES11SP1 server. I get the following error
message as part of the puppet catalog run on a SLED11SP1 client.
Augeas[sap_host_entries](provider=augeas): Opening augeas with root /, lens
path , flags 0
err: /Stage[main]/Sap/Augeas[sap_host_entries]: Could not evaluate: unknown
error - Failed to initialize Augeas
Can somebody shed some light on the error
2010 Feb 22
6
Augeas type: Removing an entry from /etc/hosts
Hi all,
I''m just starting to look at using Augeas with Puppet to manage some of
our configuration files. I thought I would start with a simple task of
removing an entry from the /etc/hosts file. I''m not finding it simple
though!
We have a number of hosts with entries in the /etc/hosts file like this:
127.0.1.1 hostname
We would like to remove these lines. Now I know this can
2013 Jan 24
2
Augeas file line edit please help
what i thought would be a simple edit using augeas is turning out to not be
so straight forward, can anyone please help ?
the plan is to edit sendmail.cf and change the default DS to
DShostname.domain
class mail {
$key = DS
service {
''sendmail'':;
}
augeas { "sendmail.cf/$key":
context =>
2009 Mar 02
31
Using Augeas type to update sshd_config's AllowGroups
Hey gang,
I seem to be having a brain disconnect on how to get the Augeas type to
manage things that have multiple values (i.e. an Augeas tree) via Puppet.
If I run this in augtool:
augtool> set /files/etc/ssh/sshd_config/AllowGroups/1000 sshuser
augtool> save
I see this in /etc/ssh/sshd_config:
AllowGroups sshuser
However, if I try this in an Augeas type:
augeas {
2011 Mar 31
5
manage /etc/passwd and /etc/group
Hi again,
I am trying to add the following to my /etc/passwd and /etc/group
files
+:::::
and
+:::
this is for ldap search on the servers.
I am note quite sure on howto do this, I tryed with the following code
augeas{
"groups ldap":
context => "/files/etc/group",
changes => [
2010 Jun 02
22
augeas type and /etc/services
Has anyone attempted to use the augeas type to add a service? I got the
service to add no problem, but having some difficulties to get the match to
work to prevent duplicate entries from adding. Since the service-name[*]
has endless number of entries I used a glob so it checks all the entries but
that does not seem to work. Any ideas on how to proceed?
augeas { app_tcp'':
context
2013 Jan 07
3
How manage xml elements as resources?
I would like to use puppet classes to inject and/or replace xml elements
into an existing xml configuration file. This seems to me to be a common
problem already solved. Can anyone suggest the easiest way to do this?
An example use case would look like something like this.
Given xml file:
<host>
<server name="one"/>
<server name="two"/>
2016 Nov 03
1
Transform and "Lenses xx and xx could be used to load this file"
Hi David,
We have a general problem using Augeas in libguestfs and I wonder
if you have any advice.
The problem is that we often -- as with yesterday's patch -- add new
config file paths to lenses. Or we want to parse config files which
are not necessarily in the exact paths that Augeas is expecting.
Now it's easy enough to parse such files using an arbitrary lens by
calling
2013 Oct 25
1
replace a value in file
Hi
I would lie replace a value in my config file
/etc/default/fusioninventory-agent
MODE = daemon
and i would like replace cron by daemon
My manifest is this but is not good, can you have an idea? I think it s
Simplevers.lns is not good..
augeas { ''fusioninventory mode'':
lens => ''Simplevars.lns'',
incl =>
2012 Nov 06
1
augeas syntax for adding similar lines to hosts.allow
I''ve found a similar thread here, but it doesn''t do quite what I need.
https://groups.google.com/forum/?fromgroups=#!topic/puppet-users/VMloh1KrSew
I have multiple lines of the form below in hosts.allow:
sshd,sshd2: 1.1.1.1
sshd,sshd2: 2.2.2.2
etc.
I''m struggling with the syntax to add yet another "sshd,sshd2: client" line
to hosts.allow.
augtool is
2013 Nov 06
4
augeas onlyif problem
I''m trying to make sure a specific user has a special ssh key used as his
identity file.
so I''m trying something like:
augeas{"user_second_key":
context => "/files/home/user/.ssh/config",
changes => [ "ins IdentityFile after
/files/home/user/.ssh/config/IdentityFile[last()]",
" set