Class: VagrantPlugins::Saltdeps::Config::Provisioner
- Inherits:
-
Object
- Object
- VagrantPlugins::Saltdeps::Config::Provisioner
- Defined in:
- lib/vagrant-saltdeps/config/provisioner.rb
Instance Attribute Summary collapse
-
#base_vagrantfile ⇒ Object
Returns the value of attribute base_vagrantfile.
-
#checkout_path ⇒ Object
Returns the value of attribute checkout_path.
-
#deps_path ⇒ Object
Returns the value of attribute deps_path.
-
#grains_path ⇒ Object
Returns the value of attribute grains_path.
-
#merge_grains ⇒ Object
Returns the value of attribute merge_grains.
-
#merge_pillars ⇒ Object
Returns the value of attribute merge_pillars.
-
#merged_path ⇒ Object
Returns the value of attribute merged_path.
-
#pillars_path ⇒ Object
Returns the value of attribute pillars_path.
Instance Method Summary collapse
- #finalize! ⇒ Object
-
#initialize ⇒ Provisioner
constructor
A new instance of Provisioner.
- #validate(machine) ⇒ Object
Constructor Details
#initialize ⇒ Provisioner
Returns a new instance of Provisioner.
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/vagrant-saltdeps/config/provisioner.rb', line 14 def initialize super @machine = nil @checkout_path = UNSET_VALUE @deps_path = '.vagrant-salt/saltdeps.yml' @grains_path = UNSET_VALUE @pillars_path = UNSET_VALUE @merge_pillars = UNSET_VALUE @merge_grains = UNSET_VALUE @merged_path = UNSET_VALUE @base_vagrantfile = UNSET_VALUE end |
Instance Attribute Details
#base_vagrantfile ⇒ Object
Returns the value of attribute base_vagrantfile.
12 13 14 |
# File 'lib/vagrant-saltdeps/config/provisioner.rb', line 12 def base_vagrantfile @base_vagrantfile end |
#checkout_path ⇒ Object
Returns the value of attribute checkout_path.
5 6 7 |
# File 'lib/vagrant-saltdeps/config/provisioner.rb', line 5 def checkout_path @checkout_path end |
#deps_path ⇒ Object
Returns the value of attribute deps_path.
6 7 8 |
# File 'lib/vagrant-saltdeps/config/provisioner.rb', line 6 def deps_path @deps_path end |
#grains_path ⇒ Object
Returns the value of attribute grains_path.
7 8 9 |
# File 'lib/vagrant-saltdeps/config/provisioner.rb', line 7 def grains_path @grains_path end |
#merge_grains ⇒ Object
Returns the value of attribute merge_grains.
10 11 12 |
# File 'lib/vagrant-saltdeps/config/provisioner.rb', line 10 def merge_grains @merge_grains end |
#merge_pillars ⇒ Object
Returns the value of attribute merge_pillars.
9 10 11 |
# File 'lib/vagrant-saltdeps/config/provisioner.rb', line 9 def merge_pillars @merge_pillars end |
#merged_path ⇒ Object
Returns the value of attribute merged_path.
11 12 13 |
# File 'lib/vagrant-saltdeps/config/provisioner.rb', line 11 def merged_path @merged_path end |
#pillars_path ⇒ Object
Returns the value of attribute pillars_path.
8 9 10 |
# File 'lib/vagrant-saltdeps/config/provisioner.rb', line 8 def pillars_path @pillars_path end |
Instance Method Details
#finalize! ⇒ Object
44 45 46 47 48 49 50 51 |
# File 'lib/vagrant-saltdeps/config/provisioner.rb', line 44 def finalize! @grains_path = '.vagrant-salt/grains' if @grains_path == UNSET_VALUE @pillars_path = '.vagrant-salt/pillars' if @pillars_path == UNSET_VALUE @merged_path = '.vagrant-salt' if @merged_path == UNSET_VALUE @merge_grains = true if @merge_grains == UNSET_VALUE @merge_pillars = true if @merge_pillars == UNSET_VALUE end |
#validate(machine) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/vagrant-saltdeps/config/provisioner.rb', line 27 def validate(machine) @machine = machine errors = _detected_errors if @checkout_path Pathname.new(@checkout_path).(machine.env.root_path) else @checkout_path = '.saltdeps' Pathname.new(@checkout_path).(machine.env.root_path) end (@grains_path, errors) (@pillars_path, errors) return {"salt provisioner" => errors} end |