title: Chef LWRP - defs/resources execution order
body: <p>I have the following in a LWRP, all it does is exploding an .ear file::</p>
  
  <pre><code>action :expand do
      ear_folder = new_resource.target_folder
      temp_folder = "#{::File.join(ear_folder, 'tmp_folder')}"
  
      expand_ear(new_resource.source, ear_folder)
      expand_wars(ear_folder,temp_folder)
  
  end
  
  def expand_ear(src,dest)
     bash "unzip EAR" do
       cwd dest
       code &lt;&lt;-EOF
       pwd
       ls -l
       jar -xvf #{src}         
       EOF
     end
  end
  
  def explode_wars(src,dest)
      Dir.glob("#{basepath}/*.war") do |file|
             ......... ###crete tmp folder, move .war there then unzip it to 'dest'
          end
  end
  </code></pre>
  
  <p>When I run this /using Vagrant provide/ the output shows that Chef starts 'expand_ear' and 'expand_wars' in parallel. As a consequence the expand_wars def fails to find all .wars /they are still being extracted. I tried making 'expand_ear' boolean and wrapping 'expand_wars' in : </p>
  
  <pre><code>if expand_ear?(src,dest) 
     expand_war 
  end
  </code></pre>
  
  <p>but this yields the same result.???</p>