Displaying 20 results from an estimated 105 matches for "refreshonly".
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 file''s pr...
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''
2007 Sep 04
9
exec creates and subscribe
..."
}
This does exactly what the documentation says it will; it will only run when the file
specified by creates does not exist. I''m wondering if it wouldn''t be better if the
behavior was be modified so that it would run when a refresh event occurs. This would be
similar to refreshonly except that it would also ensure the target is present; however,
I''m not sure if this is the intended purpose of "creates".
I can''t see any other way to make sure a file generated by an exec exists and regenerate
it when the source changes. I have had several incidenc...
2012 Oct 02
3
PROBLEM : Cannot require an Exec
...of exec resources. we found that we cannot use require =>
Exec and it does not work at all as expected. here is some sample code.
exec { "exec-AAA":
command => "/bin/true",
returns => 0,
notify => Exec["exec-BBB"],
}
exec { "exec-BBB":
refreshonly => true,
command => "/bin/false",
returns => 0,
notify => Exec["exec-CCC"],
}
exec { "exec-CCC":
refreshonly => true,
command => "/bin/touch /tmp/CCC",
returns => 0,
}
exec { "exec-DDD":
requi...
2006 Aug 27
5
Re: preseeding files only on reinstall
On Aug 27, 2006, at 9:55 AM, Thorsten Sandfuchs wrote:
> hio,
> me again :)
>
> In Debian, there is a mechanism to preseed debconf (configuration-
> database for
> the system) with decisions, before installing a package. Debconf
> mussn''t ask
> the user then. I wrote this pp for preseeding-support:
[snip]
Very cool. Seems like that''s something that
2013 Mar 12
2
Only running database_grant the first time.
...abase grants that I run after creating users, but when I
subsequently run vagrant up or provision these grants fail (because of some
changes I make to the mysql config after they have been created.)
I''m using database_grant to execute the grants, but there doesn''t seem to
be a refreshonly parameter for it?
Is there any way to avoid running these grants again?
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@google...
2007 Dec 06
1
order, managing one file and refreshonly
...do that this way:
file { "/etc/apt/sources.list":
source => "puppet://$server/apt/apt-sources-list",
mode => 0644, owner => root, group => root,
notify => Exec["AptUpdate"],
}
exec { "AptUpdate":
command => "apt-get update",
refreshonly => true
}
And it''s working, but... I need this refreshment before any other
packages will be installed. How to do that, without adding "before"
statement to all pacakges definitions I write?
bye
---
Grzegorz MarszaĆek
graf0@post.pl
2012 Dec 26
2
problem with restart a service when a file changes
...*file { "/opt/zimbra/conf/spamassassin/99_rule.cf":*
* ensure => file,*
* source => "puppet:///modules/spam_rule/99_rules.cf",*
* # notify => Exec["zmamavisdctl"],*
*}*
*
*
*
*
*# define the service to restart*
*exec { "zmamavisdctl":*
* refreshonly => true,*
* command => "/opt/zimbra/bin/zmamavisdctl",*
* subscribe => File["/opt/zimbra/conf/spamassassin/99_rules.cf"],*
*}*
*
*
*}*
*
*
*else{*
*
*
*# globals perms*
*File {*
* owner => mailcleaner,*
* group => mailcleaner,*
* mode => 644,*
*}*
*
*...
2006 Sep 07
13
How to handle config files used by a combination of classes?
Hi,
How should I handle the combinatorics when one config file must be
built for a combination of possible classes?
Take for example the amd automounter''s configuration file, which on
Debian is found at /etc/am-utils/amd.conf. This is an INI style file
which looks like:
[fsname1]
param1=foo
param2=bar
[fsname2]
param1=baz
param2=quag
In my case I have one class of machines
2012 Apr 25
3
Exec and snmpd restart question
Hello Pros and users of Puppet.
I have two problems with the following modul setup:
My first problem that i tried every combination of
require,notify,subscribe for the mail sending exec but it runs every
single time when i run the module no matter if the files changed or
not.
Second problem that puppet reports that snmpd was refreshed by two
resource and restarted but actually it doesnt happen.
2013 Mar 14
4
exec resource not refreshed when subscribed resource changes
...cause running on a
host
Debug: Finishing transaction 144533424
Debug: Storing state
Debug: Stored state in 0.06 seconds
Notice: Finished catalog run in 0.75 seconds
I tried to omit "creates => ...", but this only makes the agent run the
resource every time. I also tried adding "refreshonly => true", but this
doesn''t help. I even tried adding "refresh => ..." with the exact same
command without any change in behaviour.
Any hints what could be wrong?
Puppet Agent version on Windows is 3.1.0.
Thanks...
Dirk
--
You received this message because y...
2010 Dec 03
6
audit=>content
Hi All,
sorry if this was discussed before but I didn''t find any solution for
my problem.
Test site.pp consists of 1 line:
file { "/tmp/bar": audit => content } exec { ''/usr/bin/true'':
refreshonly => true, subscribe => File[''/tmp/bar''] }
and it produces this error every time:
err: /Stage[main]//Node[localhost]/File[/tmp/bar]: Could not evaluate:
Could not retrieve content for {md5}0d436949d23842605ecef4164ec54381
from filebucket: File not found at /etc/puppet/manife...
2013 Apr 19
12
How to pass puppet/hiera veriable to external script ? Do I need to ?
...create_resources(group, $groups)
create_resources(user, $accounts, { notify =>
Exec[''clean_up_accounts''] })
}
class accounts::cleanup
{
exec { "clean_up_accounts":
command => "/script/to/cleanup",
refreshonly => true,
}
}
class accounts {
include accounts::users, accounts::cleanup
}
Is it possible to run this script ("/script/to/cleanup") for each created
user (so the script doesn''t have to cope with whole /home
tree structure) with its home (taken from puppet/hi...
2008 Jan 06
0
RFC: defined type for stowed packages
...ot;,
> alias => "stow-initiator_${basepackage}-${version}"
> }
>
> exec { download:
> command => "/usr/bin/rsync -a --delete ${rsyncserver}::${rsyncmodule}/${hardwaremodel}/${basepackage}-${version} ${stowdestdir}",
> refreshonly => true,
> subscribe => file["stow-initiator_${basepackage}-${version}"],
> alias => "download_${basepackage}-${version}"
> }
>
> exec { unstow-others:
> command => "cd ${stowdestdir} && stow...
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
2009 Oct 29
8
conditional restart of service
...service { dhcp3-server:
ensure => running,
hasstatus => true,
require => [ Package["dhcp3-server"], Exec["check-dhcpd-conf"] ],
}
exec { "check-dhcpd-conf":
command => "/usr/sbin/dhcpd3 -t 2>&1",
refreshonly => true,
subscribe => [ File["/etc/dhcp3/dhcpd.conf"], File["/etc/dhcp3"] ];
}
file {
"/etc/dhcp3/dhcpd.conf":
source => "puppet:///dist/dhcp/$hostname/dhcpd.conf";
"/etc/dhcp3":
source => "...
2010 Aug 31
23
Puppet + APT, I am lost...
...uppet to run `aptitude update` before it
installs or upgrades packages. That doesn''t seem out of the ordinary to
me, but I can''t make it work in Puppet.
The approach I like best, is this one:
class apt-update {
exec { "/usr/bin/aptitude update":
refreshonly => true,
}
}
define apt_package($ensure="latest") {
include apt-update
package { $name:
ensure => $ensure,
require => Class["apt-update"],
}
}
apt_package { "foo":
}
but that doesn...
2012 Aug 08
2
Exec resource don't write file after the command
...> "Wrote By Yves Nton",
notify => Exec[''test''],
}
exec { ''test'':
path => "/usr/bin:/usr/sbin:/bin",
cwd => "/root/essai",
command => "rm -rf /root/essai/html",
creates => "/root/essai/exec.txt",
refreshonly => true
}
notify { ''end'':
require => File[''/root/essai/html'']
}
}
suggestions ?
Thanks
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To view this discussion on the web visit https://groups.g...
2011 Jun 10
11
cannot manage home directories
user {''username'':
uid => 501,
gid => ''staff'',
comment => ''comment'',
ensure => present,
home => ''/Users/sysop'',
shell =>
2007 Jun 02
6
exec subscribe refresh not working
...-BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I''m trying to figure out why exec{} which subscribes to a file, doesn''t
get triggered when the file is touched by puppet. I''ve got the following:
exec {
"/usr/sbin/postmap /etc/postfix/checks/access":
refreshonly => true,
subscribe => File["/etc/postfix/checks/access"];
"/usr/sbin/postmap /etc/postfix/checks/access_client":
refreshonly => true,
subscribe => File["/etc/postfix/checks/access_client"];
}
file {
"/etc/postfix/checks...