Sha256: 8126dfeb59dc766f335bb13cc593694e3d9f683b8b7eb2dcd0af3898d8f9f43f
Contents?: true
Size: 579 Bytes
Versions: 12
Compression:
Stored size: 579 Bytes
Contents
module VagrantPlugins module Chef module Cap module FreeBSD module ChefInstalled # Check if Chef is installed at the given version. # @return [true, false] def self.chef_installed(machine, product, version) knife = "/opt/#{product}/bin/knife" command = "test -x #{knife}" if version != :latest command << "&& #{knife} --version | grep '#{version}'" end machine.communicate.test(command, sudo: true) end end end end end end
Version data entries
12 entries across 12 versions & 2 rubygems