sous-chefs / certificate

Development repository for the certificate cookbook
https://supermarket.chef.io/cookbooks/certificate
73 stars 43 forks source link

No resource or method named `certificate_manage' for `Chef::Recipe "manage_by_attributes"' #41

Closed jtomaszewski closed 9 years ago

jtomaszewski commented 9 years ago

Whenever I add certificate::manage_by_attributes into the role's runlist OR add it to the recipe via include_recipe (and adding the certificate to the recipe/metadata.rb), this is the error I get:

Relevant File Content:
----------------------
/home/jtomaszewski/chef-solo/cookbooks-2/certificate/recipes/manage_by_attributes.rb:

 18:  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 19:  # See the License for the specific language governing permissions and
 20:  # limitations under the License.
 21:
 22:  node['certificate'].values.each do |cert|
 23:    cert.each_pair do |id, opts|
 24:      Chef::Log.debug "Create certs #{id} from attribute"
 25>>     certificate_manage id do
 26:        action :create
 27:        opts.each { |k, v| __send__(k, v) if self.respond_to?(k) } unless opts.nil?
 28:      end
 29:    end
 30:  end
 31:

Running handlers:
[2014-12-04T17:59:36+01:00] ERROR: Running exception handlers
Running handlers complete

[2014-12-04T17:59:36+01:00] ERROR: Exception handlers complete
[2014-12-04T17:59:36+01:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
Chef Client failed. 1 resources updated in 5.210106305 seconds
[2014-12-04T17:59:36+01:00] ERROR: No resource or method named `certificate_manage' for `Chef::Recipe "manage_by_attributes"'

Do you have any idea why it can't find the LWRP resource from the certificate cookbook?

I use about ~30 other cookbooks in my chef repository and they work fine. I have no idea why this one doesn't want to work. What is interesting: it used to work some time ago (on the same 0.6.3 version). But now it doesn't, eh.

jtomaszewski commented 9 years ago

Somehow it started working correctly some time ago and the bug disappeared.