Sha256: c842f7f8c57934105b4b6c3c88f952a40452dd1aef211399b8de3993c66bbca9

Contents?: true

Size: 1.43 KB

Versions: 23

Compression:

Stored size: 1.43 KB

Contents

require_relative "base"
require_relative "../helpers"

module VagrantPlugins
  module Ansible
    module Config
      class Guest < Base

        attr_accessor :provisioning_path
        attr_accessor :tmp_path
        attr_accessor :install
        attr_accessor :install_mode
        attr_accessor :pip_args

        def initialize
          super

          @install           = UNSET_VALUE
          @install_mode      = UNSET_VALUE
          @pip_args          = UNSET_VALUE
          @provisioning_path = UNSET_VALUE
          @tmp_path          = UNSET_VALUE
        end

        def finalize!
          super

          @install           = true                   if @install           == UNSET_VALUE
          @install_mode      = :default               if @install_mode      == UNSET_VALUE
          @pip_args          = ""                     if @pip_args          == UNSET_VALUE
          @provisioning_path = "/vagrant"             if provisioning_path  == UNSET_VALUE
          @tmp_path          = "/tmp/vagrant-ansible" if tmp_path           == UNSET_VALUE
        end

        def validate(machine)
          super

          case @install_mode.to_s.to_sym
          when :pip
            @install_mode = :pip
          when :pip_args_only
            @install_mode = :pip_args_only
          else
            @install_mode = :default
          end

          { "ansible local provisioner" => @errors }
        end

      end
    end
  end
end

Version data entries

23 entries across 19 versions & 4 rubygems

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