- From: Aaron Abramson <
>
- To:
- Subject: [chef] Re: Chef not updating as I expect.
- Date: Tue, 13 Sep 2011 11:10:53 -0500
Here is the stanza I use in my nginx recipe (for Ubuntu)
apt_repository "nginx" do
uri "
http://ppa.launchpad.net/nginx/stable/ubuntu"
distribution "lucid"
components ["main"]
keyserver "keyserver.ubuntu.com"
key "C300EE8C"
action :add
notifies :run, "execute[apt-get update]", :immediately
end
I've had issues where the stock nginx 0.7 gets installed before adding the
repository. You need to do an "apt-get remove --purge nginx" to uninstall
the 0.7, and then re-run the installer once the repository is added.
You can either do this manually, or add it as a script resource before the
package resource in your cookbook.
On Sep 13, 2011, at 10:56 AM, Geoff Meakin Acid wrote:
>
Hi all,
>
>
I am calling the apt cookbook to set up apt on my node (just apt::default,
>
nothing fancy).
>
Later on, I realise that default debian includes nginx0.7, and I really
>
want nginx1.0.6, for which I can add an apt repository.
>
I naturally think that the apt cookbook is the place for this, so I alter
>
the default recipe and add this:
>
>
apt_repository "nginx" do
>
uri "http://nginx.org/packages/debian/"
>
distribution "squeeze"
>
components ["nginx"]
>
action :add
>
end
>
>
Pretty simple - I recommit, reupload the cookbooks, and expect the next
>
time chef-client runs, for me to have a brand new
>
/etc/apt/sources.list.d/nginx.list
>
Except… nothing happens -
>
Am I viewing chef the wrong way? It works if I instantiate a brand new
>
node, but chef seems to believe its got no work to do on an existing node..
>
>
I have seen similar behaviour with a configuration file - e.g. nginx.conf -
>
the first time chef writes it out fine, nicely templated. But if I go and
>
change it and rerun chef-client, nothing happens. I would have expected
>
chef to say 'hey this file doesnt look the way it's supposed to, i'm going
>
to fix it back'
>
>
Thanks, Geoff
>
>
>
--
>
- [chef] Re: RE: Unable to set environment on a node during bootstrap, (continued)
- [chef] Re: RE: Unable to set environment on a node during bootstrap, Noah Kantrowitz, 09/12/2011
- [chef] RE: Re: RE: Unable to set environment on a node during bootstrap, Michael Garrett, 09/12/2011
- [chef] Re: RE: Re: RE: Unable to set environment on a node during bootstrap, Michael Herman, 09/12/2011
- [chef] RE: Re: RE: Re: RE: Unable to set environment on a node during bootstrap, Michael Garrett, 09/12/2011
- [chef] Chef not updating as I expect., Geoff Meakin Acid, 09/13/2011
- [chef] Re: Chef not updating as I expect., Nikolay Sturm, 09/13/2011
- [chef] Re: Re: Chef not updating as I expect., John E. Vincent (lusis), 09/13/2011
- [chef] Re: Re: Re: Chef not updating as I expect., Nikolay Sturm, 09/16/2011
- [chef] Re: Re: Re: Re: Chef not updating as I expect., Joshua Miller, 09/16/2011
- [chef] Re: Re: Re: Re: Chef not updating as I expect., Joshua Miller, 09/16/2011
- [chef] Re: Chef not updating as I expect., Aaron Abramson, 09/13/2011
Archive powered by MHonArc 2.6.16.