i get the below error when i connect to a node from the workstation and run the chef client, i have the apt folder uploaded. Dont know what is wrong
ssh node 'sudo chef-client'
[2018-09-15T16:30:39+00:00] INFO: Forking chef instance to converge...
[2018-09-15T16:30:40+00:00] INFO: *** Chef 11.8.2 ***
[2018-09-15T16:30:40+00:00] INFO: Chef-client pid: 1827
[2018-09-15T16:30:41+00:00] INFO: Run List is [recipe[my_cookbook]]
[2018-09-15T16:30:41+00:00] INFO: Run List expands to [my_cookbook]
[2018-09-15T16:30:41+00:00] INFO: Starting Chef Run for node
[2018-09-15T16:30:41+00:00] INFO: Running start handlers
[2018-09-15T16:30:41+00:00] INFO: Start handlers complete.
[2018-09-15T16:30:42+00:00] INFO: HTTP Request Returned 404 Not Found:
[2018-09-15T16:30:43+00:00] INFO: Loading cookbooks [apt, my_cookbook]
================================================================================
Recipe Compile Error in /var/chef/cache/cookbooks/my_cookbook/recipes/default.rb
NameError
Cannot find a resource for apt_update on ubuntu version 14.04
Cookbook Trace:
/var/chef/cache/cookbooks/apt/recipes/default.rb:40:in from_file' /var/chef/cache/cookbooks/my_cookbook/recipes/default.rb:10:in
from_file'
Relevant File Content:
/var/chef/cache/cookbooks/apt/recipes/default.rb:
33: if node['apt']['compile_time_update'] && apt_installed?
34: apt_update('compile time') do
35: frequency node['apt']['periodic_update_min_delay']
36: ignore_failure true
37: end.run_action(:periodic)
38: end
39:
40>> apt_update 'periodic' do
41: frequency node['apt']['periodic_update_min_delay']
42: end
43:
44: # For other recipes to call to force an update
45: execute 'apt-get update' do
46: command 'apt-get update'
47: ignore_failure true
48: action :nothing
49: notifies :touch, 'file[/var/lib/apt/periodic/update-success-stamp]', :immediately
[2018-09-15T16:30:43+00:00] ERROR: Running exception handlers
[2018-09-15T16:30:43+00:00] ERROR: Exception handlers complete
[2018-09-15T16:30:43+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2018-09-15T16:30:43+00:00] ERROR: Cannot find a resource for apt_update on ubuntu version 14.04
[2018-09-15T16:30:43+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit co
de 1)
Below is my cookbook
Default.rb
Cookbook Name:: test
Recipe:: default
Copyright 2015, YOUR_COMPANY_NAME
All rights reserved - Do Not Redistribute
include_recipe "apt"
package 'nginx' do
action :install
end
service 'nginx' do
action [:start, :enable]
end
file '/usr/share/nginx/html/index.html' do
content '