Sha256: ab430bfa15ae840eb238364c3d9479d19b7775510be94c9f3c064f71f6dd4ff7
Contents?: true
Size: 583 Bytes
Versions: 39
Compression:
Stored size: 583 Bytes
Contents
module VagrantPlugins module Chef module Cap module Linux 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 'Chef: #{version}'" end machine.communicate.test(command, sudo: true) end end end end end end
Version data entries
39 entries across 35 versions & 5 rubygems