Hi,
Why chef "scan" all the recipes b4, I'll explain.
I have 3 recipes that chain to each other with include command:
For example:
Recipe1:
directory '/tmp/backup' do
owner 'root'
group 'root'
mode '0755'
recursive true
action :create
end
include_recipe ‘cookbook::preparation’
Recipe2:
include_recipe ‘cookbook::restore’
The problem is that the chef is “scan” all the recipes at one time and failed that he can’t find folder/file in recipe 2.
Recipe 1 need to create this folder but somehow the chef is jumped to recipe2.
default recipe:
include_recipe 'centos7::git_clone' # recipe1
include_recipe 'centos7::preparation' # recipe2
include_recipe 'centos7::restore' # recipe3
I hope I’ve explained myself good.
Please HELP