Displaying 20 results from an estimated 10000 matches similar to: "unless & onlyif for the exec"
2010 Jun 09
6
Input sought on changing default vardir on OS X.
0.25.5 changed the default vardir from /var/puppet to /var/lib/puppet
and it''s caused the odd issue we have to fix in the Mac pkg
preflights.
After re-reading ''man hier'' I''m tempted to change the default on OS X to:
/var/db/puppet
instead.
/var/ multi-purpose log, temporary, transient, and spool files
...
2011 May 02
2
exec resource: negate onlyif condition
Hi,
today I''m stupid. How can I negate the test for execs onlyif?
I want to run the exec onlyif command returns 1.
regards, Andreas
--
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
2010 Mar 04
2
exec failure
Hello,
I''m using puppet 0.25.1 - and I''m trying to create a custom resource to
use launchctl to stop a launchd job.
command => "launchctl stop `launchctl list | grep $job_real | cut -f 3`",
yeilds:
err:
//sav/Stop_launchd_job[com.Symantec.SymSecondaryLaunch]/Exec[com.Symantec.SymSecondaryLaunch]/returns:
change from notrun to 0 failed: launchctl stop `launchctl
2013 Apr 15
5
Using onlyif for Windows exec
Hello,
I am in the process of "trying out" Puppet, and so far, it is going really
well, and I can see a clear line of how we can use it internally.
I do have one question though with regard to the using the onlyif parameter
of the exec command (as per here
http://docs.puppetlabs.com/references/latest/type.html#exec).
Ideally, what I would like to do is to only run a PowerShell exec
2012 Apr 25
5
exec's onlyif parameter fails for a bash one-liner
I would like to ''exec'' an installation script ''onlyif'' an installation
directory is empty. I tried using following bash one-liner however it
didn''t work:
<code>
exec{$one_install_script:
require => File[$one_install_script],
onlyif => "[ \"$(/bin/ls -A $one_location)\" ] && exit 1 || exit
0"
}
2007 Mar 29
2
some questions regarding inhert, unless/onlyif and notify on recursive objects
hello,
i''m just playing around with the really great puppet to learn the syntax
and see what it can do. i''m using puppet 0.22.1 on debian etch.
i created a aide class to distribute a modified aide.conf.d directory
and if not already done initialize the database (yes this should
probably be better organized and databas initialization should be
performed as the last step):
2012 Mar 12
10
Use onlyif in EXEC
Hi guys!
I need configure one command exec with onlyif parameter.
I want test file size exist or no.
Ho i do this?
Tks in advanced.
Douglas
--
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
2012 Jul 03
6
Using onlyif
Here''s what I''m using:
exec { "cert-fix":
command => "curl http://curl.haxx.se/ca/cacert.pem -o
/etc/pki/tls/certs/ca-bundle.crt",
onlyif => "test -e /etc/pki/tls/certs/ca-bundle.crt",
}
But it keeps on failing:
> [default] Running Puppet with /tmp/vagrant-puppet/manifests/acid.pp...
> Parameter onlyif failed: ''test -e
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
2007 Feb 06
14
Unless in exec doesn''t seem to be honored on notify.
This was a fun one to track down...
I was trying to use the append_if_no_such_line script from the wiki and it
was working fine EXCEPT when I threw a notify at it.
The notify appears to completely ignore both unless and onlyif within the
exec for some reason.
If I put the same test in the actual command line, it works fine.
Example:
unless => "/bin/grep -Fqe ''$line''
2010 Feb 18
7
Augeas pam.d argument checking
I''m trying to change the password complexity requirements in
pam.d/system-auth using augeas. I can append the values (lcredit=-1,
ucredit=-1, etc) onto the correct place, but if another value is
already present (i.e. lcredit=-2), the onlyif match statement doesn''t
seem to support checking regular expressions inside of strings. How do
I check that any numeric value exists in the
2012 Aug 29
1
augeas and cron.allow
Hi.
I am having a few problems with augeas and need some help.
What I am trying to use is augeas to update the cron.allow file. I can get augeas to add the required name but I am having problems with getting it to add the name once.
augeas { "check_mk_cron.allow" :
context => "/files/etc/cron.allow",
# changes => "set
2007 Mar 18
1
A wish or possible?
Hi,
One thing I''d like to be able to do is this...
define sedfile ( $file = '''', $target = '''', $pattern = '''', $options = ''-i -n''
, onlyif = '''' ) {
case $file {
'''': { err ( "Require valid filename: ''$file''" ) }
}
case $target {
2008 Jan 10
10
Install Package only if a certain file exists.
So I can''t quite see how to do this in the existing syntax.
Ideally there would be an onlyif parameter for packages, but that doesn''t
seem to be the case.
I could create a fact that returns true or false depending on whether the
file exists, but that doesn''t feel like the right way to do it either.
I could do something like:
$file_exists =
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
2010 Dec 23
2
Multiple AllowGroups entries in sshd_config with Puppet and Augeas
Hi,
After extensively looking into puppet + augeas for managing the
AllowGroups in sshd_config, I came to the conclusion that it won''t
work as I expected :( So I''m sharing my thoughts here.
The main objective is allowing multiple groups per-node, depending on
what the security team wants. Since I want this to be dynamic, I
created a define in a class:
class ssh::server::config
2009 Jun 04
3
WWDC Puppeteer lunch
Reminder for Mac Puppeteers going to WWDC
How about we meet for lunch at noon on Tuesday. Let''s try to get the
table closet to the Odwalla refrigerator, just for reference. We can
get more specific on this list on the 8th after we verify the set up.
I might even get there a little earlier and put down "reserved" tags.
---
Thank you,
Allan Marcus
Solutions Architect
Central
2011 Jun 24
7
Different users within same exec
I have the following exec in my manifest :
exec { some_exec:
path => [ "/bin","/usr/bin","/usr/local/bin" ],
command => "EXECUTE COMMAND 1",
onlyif => "EXECUTE COMMAND 2",
logoutput => "on_failure"
}
I want that the "COMMAND 1" should be executed by "USER 1" and
"COMMAND 2"
2012 Jul 31
4
Long processing time using Augeas
Hi!
I using Augeas to handle dump and passno for certain mount points in
/etc/fstab. Each mount point is defined as it''s own augeas block:
augeas { ''homeLV'':
context =>
''/files/etc/fstab'',
changes => [
2008 Oct 08
10
Puppet Augeas Plugin
Bryan -- I''m using the puppet augeas plugin at
http://git.et.redhat.com/?p=ace.git;a=blob;f=modules/augeas/plugins/puppet/type/augeas.rb;h=2346c37d724d7607ed4e09b0413700bec2b7cbed;hb=HEAD
I''m running into a behavior that I wouldn''t expect. I''d like to confirm
an entry in sysctl.conf by changing the value if necessary or appending
the key/value if it