sc-mongodb
sc-mongodb copied to clipboard
undefined method `to_yaml'
:ghost: Brief Description
We are getting "undefined method `to_yaml'" using the version 4.1.0 in Chef Supermarket DOWNLOAD
Version 4.1.0 in Chef Supermarket is missing this change: change
This is the full stack:
------------------------------------------------------------------------------------------------
Error executing action create on resource 'template[/etc/mongod.conf]'
Chef::Mixin::Template::TemplateError
undefined method to_'yaml' for Hash:0x00000000076793d0
Resource Declaration:
---------------------
template new_resource.dbconfig_file do
cookbook new_resource.template_cookbook
source new_resource.dbconfig_file_template
group new_resource.root_group
owner 'root'
variables(
config: new_resource.config
)
helpers MongoDBConfigHelpers
mode '0644'
notifies new_resource.reload_action, "service[#{new_resource.name}]"
end
------------------------------------------------------------------------------------------------
:pancakes: Cookbook version
4.1.0
:woman_cook: Chef-Infra Version
Chef 16
:tophat: Platform details
Cloud RHEL 7.7
Steps To Reproduce
Converge with the following: default['mongodb']['config']['mongod']['security']['authorization'] = 'enabled' default['mongodb']['mongo_major_version'] = '4.0.0-1.el7' default['mongodb']['sslverify'] = false default['mongodb']['gpgcheck'] = true default['mongodb']['repo_name'] = 'mongo-nexus' default['mongodb']['base_url'] = nil default['mongodb']['gpgkey'] = nil default['mongodb']['core_packages'] = %w(mongodb-enterprise)
:police_car: Expected behavior
Converge successful
:heavy_plus_sign: Additional context
None
I fixed it adding require 'yaml' in my wrapper cookbook