[chef] Reloading ohai during compilation?


Chronological Thread 
  • From: Eric Herot < >
  • To:
  • Subject: [chef] Reloading ohai during compilation?
  • Date: Mon, 16 Sep 2013 13:22:20 -0400

So if I have code like this:

user "deploy"

file "#{node['etc']['passwd']['deploy']['dir']}/.somefile" do
  source "somefile"
end

How do I make it work without giving me an error like this one:


ArgumentError
-------------
You must supply a name when declaring a dir resource

... and without "assuming" that deploy's home directory is always going to be /home/deploy?

I tried using this trick:


but it doesn't seem to get run during the compile phase at all (which makes sense).  Is there a way around this problem?  Do I have to force all users to get created during the compile phase?



Archive powered by MHonArc 2.6.16.

§