Hi
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 files/default
.
This behaviour does not match the behaviour of cookbook_file
.
I assume the behaviour of cookbook_file
to be correct, per the docs at cookbook_file Resource
The docs of remote_directory
aren't as "verbose" on remote_directory Resource. It simply states:
The
remote_directory
resource will obey file specificity.
As there's no definition of "file specificity" on the remote_directory
documentation, I guess that "file specificity" of remote_directory
and cookbook_file
should mean the same.
Can anyone confirm? Is this a known bug?