Displaying 20 results from an estimated 4000 matches similar to: "manage sudoers with augeas"
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
2010 Jun 30
7
augeas and sudo woes
The following function is based on code I found here in an earlier
thread.
define sudoer() {
augeas { "sudo${name}":
context => "/files/etc/sudoers",
changes => [
"set spec[last() + 1]/user ${name}",
"set spec[last()]/host_group/host ALL",
"set spec[last()]/host_group/command NOPASSWD: ALL",
"set
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
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
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
2010 Sep 06
6
augeas and /etc/securetty
Hi, I need to add one line to /etc/securetty, say it needs to be ttyS1. Do
not add it if ttyS1 already exists in file /etc/securetty.
How to achieve this using puppet module in puppet 2.5? This file is
different than the other examples using augeas, this one only has value per
line, not name-val pair.
Thanks,
Hai
--
You received this message because you are subscribed to the Google Groups
2010 Oct 22
2
problem w/ puppet & augeus : xinetd.d/rsync server_args value
Hello,
I would like to have the following line (among others) in my
/etc/xinetd.d/rsync file :
server_args = --daemon --address=<ipaddress_eth0>
--log-file=/var/log/rsyncd.log
To this end, i am using the camptocamp rsyncd module available from git.
Everything works except this line. I thought it was, perhaps, a
questions of spaces (this has been discussed on the list before),
2010 Jul 27
0
Augeas working inconsistently
I’ve got this define.
define sudoentry ($user, $host = "ALL", $command = "ALL", $tag = false, $runas = "ALL") {
$sudo_changes = $tag ? {
false => [
"set spec[user = ''$user'']/user $user",
"set spec[user = ''$user'']/host_group/host $host",
"set spec[user =
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"/>
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 Nov 04
1
Default sysctl.conf with augeas.
I have a tricky problem. I''m going to use Augeas, like here
http://projects.puppetlabs.com/projects/1/wiki/Puppet_Augeas#/etc/sysctl.conf
to maintain sysctl.conf. However, since iptables is already disabled,
when I add more lines to sysctl.conf with augeas and run sysctl -p,
the following lines (which are already there) cause a failure.
# Disable netfilter on bridges.
2013 Nov 01
2
Augeas JSON example?
Greetings.
I''m trying to find a few concrete examples of how to use augeas within a Puppet module, to make changes to a JSON file. I''ve been googling for the past hour and a half, and while I have found several pages which provide reference-type documentation, I have yet to see a single usable example. All of the augeas examples seem to demonstrate how to maintain a file for
2010 Dec 29
1
Puppet and augeas - onlyif conditions; overwriting default values
Hello,
I am still not getting warm with augeas and puppet, there are some
things I do not understand. At the moment I am trying the following:
- I want to set some kernel parameters in the /etc/sysctl.conf file
- in one puppet module, I have defined some default values for the
kernel parameters
- but for several servers I want to modify some of these values,
therefore I would like to overwrite
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
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 Mar 18
3
Puppet Client using wrong environment.
Hi,
I exposed few days ago this situation on the IRC, but unfortunately I
haven''t found a way to solve it yet.
I run the Puppet Master with multiple environments, and everything is
working good but a couple of nodes that are causing me some troubles.
These nodes are pointing to my production environment and I need to point
them back to development to grab some changes I made.
I
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 =>
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
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