Sha256: 02afdd7f7cecea855040f151021f79cb2053a4585d55833f8ffedd0147d576b9

Contents?: true

Size: 1.34 KB

Versions: 9

Compression:

Stored size: 1.34 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 :version

        def initialize
          super

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

        def finalize!
          super

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

        def validate(machine)
          super

          if @install_mode.to_s.to_sym == :pip
            @install_mode = :pip
          else
            @install_mode = :default
          end

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

      end
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
vagrant-unbundled-1.9.1.1 plugins/provisioners/ansible/config/guest.rb
vagrant-compose-yaml-0.1.3 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/plugins/provisioners/ansible/config/guest.rb
vagrant-compose-yaml-0.1.2 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/plugins/provisioners/ansible/config/guest.rb
vagrant-compose-yaml-0.1.1 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/plugins/provisioners/ansible/config/guest.rb
vagrant-compose-yaml-0.1.0 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/plugins/provisioners/ansible/config/guest.rb
vagrant-unbundled-1.8.5.2 plugins/provisioners/ansible/config/guest.rb
vagrant-unbundled-1.8.5.1 plugins/provisioners/ansible/config/guest.rb
vagrant-unbundled-1.8.4.2 plugins/provisioners/ansible/config/guest.rb
vagrant-unbundled-1.8.4.1 plugins/provisioners/ansible/config/guest.rb