Sha256: 66503308ed9066f1d29c5392af5746ba504cd38e9291680135ca7d508a54306a
Contents?: true
Size: 568 Bytes
Versions: 6
Compression:
Stored size: 568 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, version) knife = "/opt/chef/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
6 entries across 3 versions & 2 rubygems