With Chef Solo v12.18.31, I had such a remote_directory block:
remote_directory "/root/.ssh" do files_mode 0o600 files_owner 'root' files_group node['root_group'] mode 0o700 owner 'root' group node['root_group'] source "default.ssh" end
I had created the
default.ssh directory directly in the cookbooks
files directory. This did not work:
Chef::Exceptions::FileNotFound ------------------------------ cookbook ew has no directory files/default/default.ssh
I had to move the
default.ssh directory to
This behaviour does not match the behaviour of
I assume the behaviour of
cookbook_file to be correct, per the docs at https://docs.chef.io/resource_cookbook_file.html#file-specificity
The docs of
remote_directory aren’t as “verbose” on https://docs.chef.io/resource_remote_directory.html. It simply states:
remote_directoryresource will obey file specificity.
As there’s no definition of “file specificity” on the
remote_directory documentation, I guess that “file specificity” of
cookbook_file should mean the same.
Can anyone confirm? Is this a known bug?