Sha256: d25990fae3425c5d55ba59263a814b97c615fa6c22c9f2ce50bd1a97601081b5
Contents?: true
Size: 680 Bytes
Versions: 39
Compression:
Stored size: 680 Bytes
Contents
module VagrantPlugins module Chef module Cap module OmniOS module ChefInstalled # TODO: this is the same code as cap/linux/chef_installed, consider merging # 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