[chef] How to control the order that Chef (solo) executes resources?


Chronological Thread 
  • From: Steve Bennett < >
  • To:
  • Subject: [chef] How to control the order that Chef (solo) executes resources?
  • Date: Sun, 8 Jul 2012 22:24:57 +1000

Hi all,
   I'm having this problem: http://stackoverflow.com/questions/11380485/chef-why-are-resources-in-an-include-recipe-step-being-skipped

Quick summary: my main recipe's default.rb looks like this:

----
include_recipe "build-essential"
include_recipe "mytardis::deps"
include_recipe "mytardis::nginx"
include_recipe "mytardis::postgresql"
----

Those recipes get "loaded" in that order, but the postgresql is the first one to be "processed":
[Sun, 08 Jul 2012 05:14:33 +0200] DEBUG: Loading Recipe mytardis via include_recipe
[Sun, 08 Jul 2012 05:14:33 +0200] DEBUG: Found recipe default in cookbook mytardis
[Sun, 08 Jul 2012 05:14:33 +0200] DEBUG: Loading Recipe build-essential via include_recipe
[Sun, 08 Jul 2012 05:14:33 +0200] DEBUG: Found recipe default in cookbook build-essential
...

[Sun, 08 Jul 2012 05:14:33 +0200] DEBUG: Loading Recipe postgresql::client via include_recipe
[Sun, 08 Jul 2012 05:14:33 +0200] DEBUG: Found recipe client in cookbook postgresql
[Sun, 08 Jul 2012 05:14:33 +0200] INFO: Processing package[postgresql-client] action install (postgresql::client line 37)
[Sun, 08 Jul 2012 05:14:33 +0200] DEBUG: package[postgresql-client] checking package status for postgresql-client

Why is this? How can I get build-essential to run first?

(I'm doing all this through Vagrant. The target is a local Ubuntu VM. I'm new to Chef, Vagrant, and Ruby - which may explain a lot.)

Steve



Archive powered by MHonArc 2.6.16.

§