- From: "Jason J. W. Williams" <
>
- To:
- Subject: [chef] Re: Re: Notifies script
- Date: Thu, 23 Jun 2011 20:03:33 -0600
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=VjIqGHDEa4OJV5J3QpF0SKbgHkyFFC/m+AlNUbWJZSQBk9sBV5SZi2UKv7X/f914lL eiSIAktkBFqqqqXWWQnSQxko8eI0uTKRKFny7iNDk5ztReIOQEoNcBnuT5B2OP4ajMlx P9lnoXvtmu4eNBUQ/IrHtGW5zLbYqpYX/KSl4=
That makes sense. Thanks for the help and heads up.
-J
On Thu, Jun 23, 2011 at 7:15 PM, Sascha Bates
<
>
wrote:
>
We've been doing stuff like this. (don't laugh). Honestly though, we've
>
pretty much weeded out almost every last bit of bash we can or abstracted it
>
with definitions. I wrote that log message in hopes that the maintainers of
>
our systems will see it and some day actually offer me a known good file (I
>
haven't been able to find two that look alike).
>
>
bash "update_pamd" do
>
code <<-EOH
>
#{pamsed1}
>
#{pamsed2}
>
EOH
>
action :nothing
>
end
>
>
log "Checking to see if pam.d/system-auth needs updating. We are using sed
>
because no definitive system-auth file has been provided to use as a
>
template." do
>
level :info
>
notifies :run, "bash[update_pamd]"
>
not_if "grep 'use_authtok md5' /etc/pam.d/system-auth"
>
end
>
>
It looks like this if the file needs no updating:
>
[Thu, 23 Jun 2011 20:04:06 -0500] DEBUG: Ran grep 'use_authtok md5'
>
/etc/pam.d/system-auth returned 0
>
[Thu, 23 Jun 2011 20:04:06 -0500] DEBUG: Skipping log[Checking to see if
>
pam.d/system-auth needs updating. We are using sed because no definitive
>
system-auth file has been provided to use as a template.] due to not_if
>
>
>
this what it looks like when it does update:
>
[Thu, 23 Jun 2011 20:14:33 -0500] INFO: log[Checking to see if
>
pam.d/system-auth needs updating. We are using sed because no definitive
>
system-auth file has been provided to use as a template.] sending run action
>
to bash[update_pamd] (delayed)
>
[Thu, 23 Jun 2011 20:14:33 -0500] INFO: Ran bash[update_pamd] successfully
>
>
On Thu, Jun 23, 2011 at 7:53 PM, Jason J. W. Williams
>
<
>
>
wrote:
>
>
>
> Is it possible to use "notifies" on a resource to run a script
>
> resource? I basically only want to run the script resource if the git
>
> resource deploys a new version.
>
>
>
> -J
>
>
Archive powered by MHonArc 2.6.16.