I ran knife solo bootstrap [myserverssh]
to initially install recipes on my server. Everything got installed correctly.
I then made changes the recipes. I ran knife solo cook [myserverssh]
to update my server. Chef however doesn't seem to find the changes/update the server. The output is:
Checking Chef version...
Starting Chef Client, version 11.4.4
Compiling Cookbooks...
Converging 0 resources
Chef Client finished, 0 resources updated
Is there something I need to do to let chef know what changed and what it needs to update ont the server?
The change I made was adding the following to the site-cookbooks/nginx/recipes/main_conf.rb:
# Make Secure Site
template "#{node['nginx']['dir']}/sites-available/default-secure" do
source "cakephp-secure-site.erb"
owner "root"
group "root"
mode 00644
notifies :reload, 'service[nginx]'
end
# Enable Secure Site
nginx_site 'default-secure' do
enable true
end
Side note: I'm also using librarian. Not sure if it makes a difference. I tried running librarian-chef clean
but it didn't help.
Ah ha! Figured it out.
First time I did
knife solo bootstrap [ec2's public address]
. Second time I didknife solo cook [ip address of my server]
.The second time it created a new nodes file (in the nodes/ folder). It was empty and didn't have any recipes/roles assigned to the host.
I copied the content of the first node file into the second.