-
Notifications
You must be signed in to change notification settings - Fork 340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Template Resource throwing error when using variable for name #477
Comments
Here some output from running
I guess it could be caused by rspec upgrades too? In any case, it used to work before. |
Nerver mind, followed the wrong trail. I will keep looking but I am not sure what's causing this. Removing the comments to avoid confusion. |
Hey @TheSerapher. I think I see your problem, but it's hard to be certain without a bit more information. You have a hash like this: {
'vsftpd.conf.erb' => config,
'vsftpd.chroot_list.erb' => node['vsftpd']['config']['chroot_list_file'],
'vsftpd.user_list.erb' => node['vsftpd']['config']['userlist_file']
} And then you iterate over that key-value map like this: .each do |template, destination| And then you call: template destination But, if any one of those values in the hash are {
'vsftpd.conf.erb' => config,
'vsftpd.chroot_list.erb' => nil,
'vsftpd.user_list.erb' => node['vsftpd']['config']['userlist_file']
} You're calling: template nil I think the fact it is breaking with the |
You are spot on. And it's caused by Fauxhai :-) I do this before:
Somehow one of them seems to be empty when upgrading from Fauxhai 2.1.2 to 2.2.0. I will dig deeper and fix locally, I doubt it's your issue! |
@TheSerapher if it's fauxhai, it's my issue 😄. I own that project too. If you're able to track it down, would you mind opening an issue on the fauxhai repo please? |
Done: chefspec/fauxhai#114 |
I have the following part in my recipe:
This works fine when running Chef but after removing an old Gemfile.lock and re-running bundler, my tests are now failing with the following error:
The Cookbook in question can be downloaded here, removing the Gemfile.lock and re-running bundler will show the error: https://github.com/TheSerapher/chef-vsftpd
If you need more details let me know.
The text was updated successfully, but these errors were encountered: