Sha256: eece2e13af9b1d49b4b09db692325999a99b78cc964aef92a98f855264bb1933

Contents?: true

Size: 610 Bytes

Versions: 54

Compression:

Stored size: 610 Bytes

Contents

module VagrantPlugins
  module Ansible
    module Cap
      module Guest
        module POSIX
          module AnsibleInstalled

            # Check if Ansible is installed (at the given version).
            # @return [true, false]
            def self.ansible_installed(machine, version)
              command = 'test -x "$(command -v ansible)"'

              if !version.empty?
                command << "&& ansible --version | grep 'ansible #{version}'"
              end

              machine.communicate.test command, sudo: false
            end

          end
        end
      end
    end
  end
end

Version data entries

54 entries across 50 versions & 5 rubygems

Version Path
vagrant-unbundled-2.3.3.0 plugins/provisioners/ansible/cap/guest/posix/ansible_installed.rb
vagrant-unbundled-2.3.2.0 plugins/provisioners/ansible/cap/guest/posix/ansible_installed.rb
vagrant-unbundled-2.2.19.0 plugins/provisioners/ansible/cap/guest/posix/ansible_installed.rb
vagrant-unbundled-2.2.18.0 plugins/provisioners/ansible/cap/guest/posix/ansible_installed.rb
vagrant-unbundled-2.2.16.0 plugins/provisioners/ansible/cap/guest/posix/ansible_installed.rb
vagrant-unbundled-2.2.14.0 plugins/provisioners/ansible/cap/guest/posix/ansible_installed.rb
vagrant-aws-mkubenka-0.7.2.pre.24 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-22795b161bf6/plugins/provisioners/ansible/cap/guest/posix/ansible_installed.rb
vagrant-unbundled-2.2.10.0 plugins/provisioners/ansible/cap/guest/posix/ansible_installed.rb
vagrant-unbundled-2.2.9.0 plugins/provisioners/ansible/cap/guest/posix/ansible_installed.rb
vagrant-unbundled-2.2.8.0 plugins/provisioners/ansible/cap/guest/posix/ansible_installed.rb
vagrant-unbundled-2.2.7.0 plugins/provisioners/ansible/cap/guest/posix/ansible_installed.rb
vagrant-unbundled-2.2.6.2 plugins/provisioners/ansible/cap/guest/posix/ansible_installed.rb
vagrant-unbundled-2.2.6.1 plugins/provisioners/ansible/cap/guest/posix/ansible_installed.rb
vagrant-unbundled-2.2.6.0 plugins/provisioners/ansible/cap/guest/posix/ansible_installed.rb
vagrant-unbundled-2.2.5.0 plugins/provisioners/ansible/cap/guest/posix/ansible_installed.rb
vagrant-unbundled-2.2.4.0 plugins/provisioners/ansible/cap/guest/posix/ansible_installed.rb
vagrant-unbundled-2.2.3.0 plugins/provisioners/ansible/cap/guest/posix/ansible_installed.rb
vagrant-unbundled-2.2.2.0 plugins/provisioners/ansible/cap/guest/posix/ansible_installed.rb
vagrant-unbundled-2.2.0.0 plugins/provisioners/ansible/cap/guest/posix/ansible_installed.rb
vagrant-unbundled-2.1.4.0 plugins/provisioners/ansible/cap/guest/posix/ansible_installed.rb