Sha256: 821ae9b2fb88d3dd5cb3f78b767873077f8f4d89e99fe971a3e25e0b8676ef2d

Contents?: true

Size: 674 Bytes

Versions: 12

Compression:

Stored size: 674 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 '#{version}'"
            end

            machine.communicate.test(command, sudo: true)         
          end
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
vagrant-unbundled-2.2.18.0 plugins/provisioners/chef/cap/omnios/chef_installed.rb
vagrant-unbundled-2.2.16.0 plugins/provisioners/chef/cap/omnios/chef_installed.rb
vagrant-unbundled-2.2.14.0 plugins/provisioners/chef/cap/omnios/chef_installed.rb
vagrant-aws-mkubenka-0.7.2.pre.24 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-22795b161bf6/plugins/provisioners/chef/cap/omnios/chef_installed.rb
vagrant-unbundled-2.2.10.0 plugins/provisioners/chef/cap/omnios/chef_installed.rb
vagrant-unbundled-2.2.9.0 plugins/provisioners/chef/cap/omnios/chef_installed.rb
vagrant-unbundled-2.2.8.0 plugins/provisioners/chef/cap/omnios/chef_installed.rb
vagrant-unbundled-2.2.7.0 plugins/provisioners/chef/cap/omnios/chef_installed.rb
vagrant-unbundled-2.2.6.2 plugins/provisioners/chef/cap/omnios/chef_installed.rb
vagrant-unbundled-2.2.6.1 plugins/provisioners/chef/cap/omnios/chef_installed.rb
vagrant-unbundled-2.2.6.0 plugins/provisioners/chef/cap/omnios/chef_installed.rb
vagrant-unbundled-2.2.5.0 plugins/provisioners/chef/cap/omnios/chef_installed.rb