Sha256: a555177605d71b702ec17122c5f4295b234b012419ba0595bad352820f213e8b

Contents?: true

Size: 1.49 KB

Versions: 30

Compression:

Stored size: 1.49 KB

Contents

require_relative "../pip/pip"

module VagrantPlugins
  module Ansible
    module Cap
      module Guest
        module Debian
          module AnsibleInstall


            def self.ansible_install(machine, install_mode, ansible_version, pip_args)
              case install_mode
              when :pip
                pip_setup machine
                Pip::pip_install machine, "ansible", ansible_version, pip_args, true
              when :pip_args_only
                pip_setup machine
                Pip::pip_install machine, "", "", pip_args, false
              else
                ansible_apt_install machine
              end
            end

            private

            def self.ansible_apt_install(machine)
install_backports_if_wheezy_release = <<INLINE_CRIPT
CODENAME=`lsb_release -cs`
if [ x$CODENAME == 'xwheezy' ]; then
  echo 'deb http://http.debian.net/debian wheezy-backports main' > /etc/apt/sources.list.d/wheezy-backports.list
fi
INLINE_CRIPT

              machine.communicate.sudo install_backports_if_wheezy_release
              machine.communicate.sudo "apt-get update -y -qq"
              machine.communicate.sudo "apt-get install -y -qq ansible"
            end

            def self.pip_setup(machine)
              machine.communicate.sudo "apt-get update -y -qq"
              machine.communicate.sudo "apt-get install -y -qq build-essential curl git libssl-dev libffi-dev python-dev"
              Pip::get_pip machine
            end

          end
        end
      end
    end
  end
end

Version data entries

30 entries across 26 versions & 4 rubygems

Version Path
vagrant-unbundled-2.2.4.0 plugins/provisioners/ansible/cap/guest/debian/ansible_install.rb
vagrant-unbundled-2.2.3.0 plugins/provisioners/ansible/cap/guest/debian/ansible_install.rb
vagrant-unbundled-2.2.2.0 plugins/provisioners/ansible/cap/guest/debian/ansible_install.rb
vagrant-unbundled-2.2.0.0 plugins/provisioners/ansible/cap/guest/debian/ansible_install.rb
vagrant-unbundled-2.1.4.0 plugins/provisioners/ansible/cap/guest/debian/ansible_install.rb
vagrant-unbundled-2.1.2.0 plugins/provisioners/ansible/cap/guest/debian/ansible_install.rb
vagrant-packet-0.1.2 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-04f7215b5e3f/plugins/provisioners/ansible/cap/guest/debian/ansible_install.rb
vagrant-packet-0.1.2 vendor/bundle/ruby/2.5.0/bundler/gems/vagrant-04f7215b5e3f/plugins/provisioners/ansible/cap/guest/debian/ansible_install.rb
vagrant-packet-0.1.2 vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-04f7215b5e3f/plugins/provisioners/ansible/cap/guest/debian/ansible_install.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-04f7215b5e3f/plugins/provisioners/ansible/cap/guest/debian/ansible_install.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-04f7215b5e3f/plugins/provisioners/ansible/cap/guest/debian/ansible_install.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/bundler/gems/vagrant-04f7215b5e3f/plugins/provisioners/ansible/cap/guest/debian/ansible_install.rb
vagrant-unbundled-2.1.1.0 plugins/provisioners/ansible/cap/guest/debian/ansible_install.rb
vagrant-unbundled-2.0.4.0 plugins/provisioners/ansible/cap/guest/debian/ansible_install.rb
vagrant-unbundled-2.0.3.0 plugins/provisioners/ansible/cap/guest/debian/ansible_install.rb
vagrant-aws-detiber-0.7.2.pre.4 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-419afb4dcffe/plugins/provisioners/ansible/cap/guest/debian/ansible_install.rb
vagrant-aws-detiber-0.7.2.pre.3 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-419afb4dcffe/plugins/provisioners/ansible/cap/guest/debian/ansible_install.rb
vagrant-aws-detiber-0.7.2.pre.2 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-419afb4dcffe/plugins/provisioners/ansible/cap/guest/debian/ansible_install.rb
vagrant-unbundled-2.0.2.0 plugins/provisioners/ansible/cap/guest/debian/ansible_install.rb
vagrant-unbundled-2.0.1.0 plugins/provisioners/ansible/cap/guest/debian/ansible_install.rb