Displaying 20 results from an estimated 5000 matches similar to: "some questions regarding inhert, unless/onlyif and notify on recursive objects"
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''
2009 Dec 17
1
unless & onlyif for the exec
Hello,
Can I specify multiple onlyif''s and/or unless''s in an exec statement?
A quick look through the recipes didn''t find any...
Thanks,
-Roy
--
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 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 15
2
executing some code with subscribe/notify/unless
Hi all,
I have some code to execute that depends on two things:
1.-) some file is modified
2.-) its log shows some error.
So I''d like to define both conditions, and I''ve done it like:
file { "file1":
recurse => true,
owner => "root",
group => "root",
mode =>
2007 Oct 12
2
"run once" directive for service or package
hi,
is there a way to specify that something is to be run only once, upon
install of the package?
i''m trying to automate the installation of some services and their
requisite packages. some of them require setting up various things
afterwards (user, passwords, etc).
i know i could have it done via exec & onlyif. however there are obvious
security issues with trusting the
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
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"
}
2013 Feb 18
2
Dependency Ordering Confusion
I have a module for windows nodes that is defined like:
class ast_win {
Class[''ast_win::env''] ~> Class[''ast_win::restart''] -> Class[''ast_win'']
ast_win::env contains a bunch of scripts that modify the environment on the
host machine. Mostly the PATH variable, but also other variables (e.g.
http_proxy) that are required for
2008 Jul 30
6
Refreshonly question
Does anyone have a technique for performing an exec the first time
puppetd runs but then reverting to refreshonly => true state for
subsequent runs?
The basic idea is:
file { "/etc/foo":
notify => Exec["bar"]
}
exec { "bar":
command => "Do stuff to /etc/foo",
refreshonly => true
}
Should I use a fact that is unset based on a
2007 Oct 18
3
verify before deploy
so I have this sudo module that I''ve been working on:
class auth::sudo {
package { sudo: ensure => installed }
file { sudo_config:
name => "/tmp/sudoers",
owner => "root",
group => "root",
mode => 0440,
notify => Exec["sudoers-syntax"],
source => [
2009 Sep 23
2
mailalias type: automatic rebuild of aliases.db?
HI,
All our unix boxes under puppet are configured with the ''mailalias'' resource
type as in :
mailalias { "root":
recipient => "linuxroot@fqdn",
ensure => present
}
The majority of those boxes however don''t have /etc/aliases served out by
puppet, rather, they simply have the installed default /etc/aliases locally.
2009 May 28
4
Managing core files using coreadm (Solaris + Puppet)
Hi all,
I have an interesting one - Solaris uses a lot of commands to
configure specific items. A simple
example is coreadm. In this example:
# coreadm -p "/var/core/core_%n_%f_%u_%g_%t_%p"
will set the directory and filename to dump core files (with some
expansion).
The question is - how to get this to run only if the config has
changed. I have come up with 2 options, neither of
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 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
2007 Aug 23
3
Using Puppet to swap eth0 and eth1
I''ve been using Puppet now for a month or so and I''ve come to a
problem that may warrant an additional Puppet metaparameter. I''m
advocating the addition of a metaparameter called "preaction" (or
something like that), which will perform some arbitrary action before
the resource is modified. There may be a way to do this within
Puppet already (with some
2009 Dec 13
13
Inherited Client and Server Apps
So, I''ve been doing something like this for applications that have a
client and server component...
node base_node {
include syslog_ng::client
}}
node app_node inherits base_node {
}
node syslog_server inherits base_node {
include syslog_ng::server
}
... because I want the client portion, syslog-ng in this case to be
installed on everything. However, the server node also has a
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
2011 Nov 01
12
What's the canonical way to enforce permissions/ownership on a directory subtree?
I''ve just tried this (we assume /opt/jetty-6.1.26 already exists):
file { "/opt/jetty-6.1.26":
owner => "jetty",
group => "users",
recurse => true,
}
... but it''s taking an *age*. What''s the Right Way?
Cheers, Robert.
--
You received this message because you are subscribed to the Google Groups
2009 Sep 10
2
Adding comments to config files with augeas
Hi,
I''ve got a ''define'' that I use to set kernel parameters in
/etc/sysctl.conf using the augeas type. It works well, but I''d like
to be able to add a comment line directly above my the parameter to
explain what it does and why it''s been changed. We currently just add
a comment in site.pp, but that''s not much use to local admins.
2013 Apr 19
12
How to pass puppet/hiera veriable to external script ? Do I need to ?
Hi,
I have a problem with running puppet with hiera based data. I am trying to
cleanup
user accounts on a range of servers (to have the same uid/gid). When I
create existing account
but with different uid/gid it doesn''t change files group ownership so I
need to
run a script which cleanups after cleanup ;-)
I use the following code:
---
:backends:
- yaml
:hierarchy:
-