Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

Use provisioner type attribute #134

Merged
merged 1 commit into from
Jan 15, 2015
Merged

Conversation

Yserz
Copy link
Contributor

@Yserz Yserz commented Dec 22, 2014

Vagrant changed the provisioner name attribute to type in version 1.7.1.

fixes #133

Vagrant changed the provisioner name attribute to type in version 1.7.1.
@jkulak
Copy link

jkulak commented Jan 12, 2015

Would be great to see that merged!

@fgrehm fgrehm merged commit 15b0039 into fgrehm:master Jan 15, 2015
@fgrehm
Copy link
Owner

fgrehm commented Jan 15, 2015

Thanks and sorry it took so long! The 1.2.0 version of the plugin will come out with this in a few ;-)

@@ -6,7 +6,7 @@ module ChefFileCachePath
def self.chef_provisioner?(machine)
provisioners = machine.config.vm.provisioners
chef_provisioners = [:chef_solo, :chef_client]
compat_provisioners = provisioners.keep_if { |p| chef_provisioners.include? p.name }
compat_provisioners = provisioners.keep_if { |p| chef_provisioners.include? p.name || p.type }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fgrehm @Yserz that might be a bit too optimistic and works only if the provisioner name is not set. However, note that you can have named provisioners in which case the p.name might be anything:
https://docs.vagrantup.com/v2/provisioning/basic_usage.html

Here's how I solved it in one of my vagrant plugins:
tknerr/vagrant-toplevel-cookbooks@ae188ee

Or @sethvargo here:
https://github.com/berkshelf/vagrant-berkshelf/blob/cd5ee78f28ee9f6bec1b72fcdbcb042b0155aa04/lib/vagrant-berkshelf/helpers.rb#L69-L86

/cc @cassianoleal

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cachier does not resolve provisioners with Vagrant 1.7.1
4 participants