Sha256: 2a53c12a7b7ff9cf3f4e5918f8fe3697821093a717983e0e7332fac702e68aff

Contents?: true

Size: 700 Bytes

Versions: 1

Compression:

Stored size: 700 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, 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

1 entries across 1 versions & 1 rubygems

Version Path
vagrant-cloudstack-1.2.0 vendor/bundle/bundler/gems/vagrant-c84e05fd063f/plugins/provisioners/chef/cap/omnios/chef_installed.rb