search for: augtool

Displaying 20 results from an estimated 152 matches for "augtool".

2011 Aug 11
1
[PATCH] fix augtool calls
parse input augtool strings to oper,key,value --- scripts/network.py | 32 ++++++++++++++++---------------- 1 files changed, 16 insertions(+), 16 deletions(-) diff --git a/scripts/network.py b/scripts/network.py index f51ee7c..65b551c 100644 --- a/scripts/network.py +++ b/scripts/network.py @@ -165,11 +165,11 @@ c...
2011 Jul 20
0
[PATCH] fix ipv4 static/dhcp/disabled networking changes
...cript) + for script in os.listdir("/etc/sysconfig/network-scripts/"): + if self.CONFIGURED_NIC in script: + log("Removing Script: " + script) + ovirt_safe_delete_config("/etc/sysconfig/network-scripts/" + script) + augtool("rm", "/files/etc/sysconfig/network-scripts/ifcfg-br"+self.CONFIGURED_NIC, "") - config = self.WORKDIR + "/config-augtool" - for line in self.IF_CONFIG: log(line) try: @@ -209,6 +205,7 @@ class Network:...
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 => [
2011 Jul 18
0
[PATCH] fix ipv6 switch to disabled
...uot;): VLAN_ID=OVIRT_VARS["OVIRT_VLAN"] diff --git a/scripts/ovirt-config-setup.py b/scripts/ovirt-config-setup.py index 753c80d..6ac09dc 100755 --- a/scripts/ovirt-config-setup.py +++ b/scripts/ovirt-config-setup.py @@ -1144,6 +1144,11 @@ class NodeConfigScreen(): augtool("rm", "/files/" + OVIRT_DEFAULTS + "/OVIRT_IP_ADDRESS", "") augtool("rm", "/files/" + OVIRT_DEFAULTS + "/OVIRT_IP_NETMASK", "") augtool("rm", "/files/" + OVIRT_DEFAULTS + "...
2011 Aug 25
6
manage sudoers with augeas
...'']/host_group/command[1]/tag NOPASSWD", ], } the error : err: /Stage[main]/Managesudo::mailops/Augeas[mailops]/returns: change from need_to_run to 0 failed: Save failed with return code false the augeas tool doesn''t return anything when I am trying to get the actual spec augtool> print /files/etc/sudoers augtool> How can I test augtool ? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-...
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[. = ''''] # /files/etc/sysconfig/iptables/table/append[8] = (none) # augtool> set /files/...
2016 Nov 03
1
Transform and "Lenses xx and xx could be used to load this file"
...-- 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 aug_transform, eg: $ ls passwd $ augtool -r `pwd` augtool> transform passwd incl /passwd augtool> load augtool> ls /files/passwd/ abrt/ lightdm/ rjones/ adm/ lirc/ root/ akmods/ lp/ rpc/ # etc As you can see I applied the...
2014 Oct 10
5
missing btrfs subvol support
Is btrfs subvol support failing just for me? Looks like nothing adds the required '@/' string. virt-ls uses the first variant of the command: ><rescue> mount -vo subvol=var/spool,ro /dev/sda2 /sysroot/ [ 113.852047] BTRFS info (device sda2): disk space caching is enabled [ 113.852869] BTRFS: has skinny extents mount: mount(2) failed: No such file or directory ><rescue>
2014 Oct 10
2
Re: missing btrfs subvol support
On Fri, Oct 10, Richard W.M. Jones wrote: > My guess is that the last one (opt/value) will be different for you. Thanks for the pointers. I will poke around. At least augtool on the host seems to behave correctly: olaf@bax:~ $ cd /dev/shm/$$ bash: cd: /dev/shm/3570: Datei oder Verzeichnis nicht gefunden olaf@bax:~ $ mkdir $_ olaf@bax:~ $ cd $_ olaf@bax:/dev/shm/3570 $ mkdir etc olaf@bax:/dev/shm/3570 $ cat > etc/fstab UUID=d538a81f-9778-424d-96cc-e48dd2d4a323 swap...
2014 Oct 10
0
Re: missing btrfs subvol support
...https://github.com/libguestfs/libguestfs/blob/master/daemon/mount.c#L154 You could try: cd /tmp mkdir etc cat > etc/fstab <<EOF UUID=123 swap swap defaults 0 0 UUID=456 / btrfs defaults 0 0 UUID=789 /var/spool btrfs subvol=@/var/spool 0 0 EOF augtool -r /tmp In augtool: augtool> ls /files/etc/fstab/3/vfstype augtool> get /files/etc/fstab/3/vfstype /files/etc/fstab/3/vfstype = btrfs augtool> get /files/etc/fstab/3/spec /files/etc/fstab/3/spec = UUID=789 augtool> get /files/etc/fstab/3/file /files/etc/fstab/3/file = /var/spool augto...
2009 May 22
0
[PATCH node] Restricts network configuration to a single NIC.
...r ${CONFIGURED_NIC}.\n" + read -ep "Continue? (y/N) " + case $REPLY in + N|n) printf "\nAborting...\n"; return;; + esac + fi + + rm -rf $WORKDIR/* + CONFIGURED_NIC=$NIC + local BRIDGE=br$NIC local IF_FILENAME="$WORKDIR/augtool-$NIC" local BR_FILENAME="$WORKDIR/augtool-$BRIDGE" @@ -69,7 +81,7 @@ function configure_interface BR_CONFIG="$BR_CONFIG\nset $BR_ROOT/GATEWAY $GATEWAY" fi ;; - A|a) return ;; +...
2012 Sep 24
7
augeas only add if doesn't exist
...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 /files/etc/hosts.allow/*[process=nrpe]/client[last()+1] 1.1.1.1 error: Failed to execute command What am I doing wrong? (I''m using the latest from here: https://raw.github.com/lutter/augeas/master/lenses/hosts_access.aug) Thank you kindly, Eugene -- You received this...
2011 Aug 15
0
[PATCH node] Don't start ntp daemons until networking is started
...8a28 100644 --- a/recipe/common-post.ks +++ b/recipe/common-post.ks @@ -225,3 +225,9 @@ mkdir -p /root/.virt-manager /home/admin/.virt-manager #symlink virt-manager-tui pointer file to .pyc version sed -i "s/tui.py/tui.pyc/g" /usr/bin/virt-manager-tui + +#set NETWORKING off by default +augtool << \EOF_NETWORKING +set /files/etc/sysconfig/network/NETWORKING no +save +EOF_NETWORKING diff --git a/scripts/network.py b/scripts/network.py index 50d4624..ea16212 100644 --- a/scripts/network.py +++ b/scripts/network.py @@ -184,6 +184,9 @@ class Network: elif offset == 2:...
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
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 =>
2010 Oct 25
0
[PATCH node] add network.py script
...else: + log("\nAborting...\n") + return + + for file in os.listdir(self.WORKDIR): + os.system("rm -rf %s/%s") % (self.WORKDIR, file) + BRIDGE = "br" + self.CONFIGURED_NIC + IF_FILENAME = self.WORKDIR + "/augtool-" + self.CONFIGURED_NIC + BR_FILENAME = self.WORKDIR + "/augtool-" + BRIDGE + log("\nConfigure $BRIDGE for use by $NIC..\n\n") + IF_ROOT = "%s-%s" % (self.IFCONFIG_FILE_ROOT, self.CONFIGURED_NIC) + self.IF_CONFIG += "rm %s\nset %s/...
2009 May 27
4
[PATCH node] REPOST Joey's and Darryl's ovirt-config-* patches
This is a repost of patches for ovirt-config-* ACK to all. Pushed.
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"/>
2009 Jun 25
1
[PATCH node] Rerunning network config resets all network config. bz#507393
..." local BR_CONFIG="rm $BR_ROOT\nset $BR_ROOT/DEVICE $BRIDGE" BR_CONFIG="$BR_CONFIG\nset $BR_ROOT/TYPE Bridge" BR_CONFIG="$BR_CONFIG\nset $BR_ROOT/PEERNTP yes" @@ -202,7 +204,7 @@ function configure_dns fi local IF_FILENAME="$WORKDIR/augtool-br${CONFIGURED_NIC}" - local IF_ROOT="$CONFIG_FILE_ROOT-br${CONFIGURED_NIC}" + local IF_ROOT="$IFCONFIG_FILE_ROOT-br${CONFIGURED_NIC}" local IF_CONFIG= if [ -z "$AUTO" ]; then @@ -241,12 +243,11 @@ function configure_dns function configure_ntp...
2010 Feb 22
6
Augeas type: Removing an entry from /etc/hosts
...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 be done with a simple exec of sed but if possible I would like to use it as a good test exercise with Augeas. Now, it''s pretty easy to do this with augtool, as follows: root@miscreant:/home/pre500# augtool augtool> match /files/etc/hosts/*/ipaddr 127.0.1.1 /files/etc/hosts/4/ipaddr augtool> rm /files/etc/hosts/4 rm : /files/etc/hosts/4 3 augtool> save Saved 1 file(s) But I can''t see how this would translate to work in Puppet as I n...