similar to: "run once" directive for service or package

Displaying 20 results from an estimated 4000 matches similar to: ""run once" directive for service or package"

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''
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
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
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 => [
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):
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 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
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
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 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: -
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
2008 May 15
2
config checks and service bounces
Puppeteers, I''ve seen things in the documentation to make me think this is possible but I''m not sure how to implement it. Here''s what I''d like to do: puppetd pulls down a config file, say httpd.conf BEFORE puppetd moves it to $path, I''d like to have it check it''s integrity with apachectl configtest IF configtest passes, then puppetd should
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 {
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" }
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
2011 Apr 30
10
How to check if a package exists
Dear all, I''m trying to do this. Say for example, I want this link: "liblcgdm.so -> liblcgdm.so.1.8.0" to be present on the client only if "lcgdm- libs-1.8.0-1sec.sl5" is already listed. I already have this to create the link: file { ''liblcgdm.so'': ensure => symlink, name => ''/opt/lcg/lib/liblcgdm.so'',
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
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