Sha256: cad5fab1d06ba9c36f8778090615801aa05220397d369ade97534defe51a879a

Contents?: true

Size: 677 Bytes

Versions: 6

Compression:

Stored size: 677 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

6 entries across 3 versions & 2 rubygems

Version Path
vagrant-unbundled-1.8.1.2 plugins/provisioners/chef/cap/omnios/chef_installed.rb
vagrant-unbundled-1.8.1.1 plugins/provisioners/chef/cap/omnios/chef_installed.rb
vagrant-cloudstack-1.1.0 vendor/bundle/bundler/gems/vagrant-1cf2a8db4ccb/plugins/provisioners/chef/cap/omnios/chef_installed.rb
vagrant-cloudstack-1.1.0 vendor/bundle/bundler/gems/vagrant-272fb27e0536/plugins/provisioners/chef/cap/omnios/chef_installed.rb
vagrant-cloudstack-1.1.0 vendor/bundle/bundler/gems/vagrant-309e896975d1/plugins/provisioners/chef/cap/omnios/chef_installed.rb
vagrant-cloudstack-1.1.0 vendor/bundle/bundler/gems/vagrant-b421af58e8b3/plugins/provisioners/chef/cap/omnios/chef_installed.rb