Class: VagrantPlugins::Vai::Config
- Inherits:
-
Object
- Object
- VagrantPlugins::Vai::Config
- Defined in:
- lib/vai/config.rb
Instance Attribute Summary collapse
-
#groups ⇒ Object
Returns the value of attribute groups.
-
#inventory_dir ⇒ Object
Returns the value of attribute inventory_dir.
Instance Method Summary collapse
- #finalize! ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #validate(machine) ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
7 8 9 10 11 |
# File 'lib/vai/config.rb', line 7 def initialize @inventory_dir = UNSET_VALUE @inventory_filename = UNSET_VALUE @groups = UNSET_VALUE end |
Instance Attribute Details
#groups ⇒ Object
Returns the value of attribute groups.
5 6 7 |
# File 'lib/vai/config.rb', line 5 def groups @groups end |
#inventory_dir ⇒ Object
Returns the value of attribute inventory_dir.
4 5 6 |
# File 'lib/vai/config.rb', line 4 def inventory_dir @inventory_dir end |
Instance Method Details
#finalize! ⇒ Object
13 14 15 16 17 |
# File 'lib/vai/config.rb', line 13 def finalize! @inventory_dir = nil if @inventory_dir == UNSET_VALUE @inventory_filename = nil if @inventory_filename == UNSET_VALUE @groups = {} if @groups == UNSET_VALUE end |
#validate(machine) ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/vai/config.rb', line 19 def validate(machine) errors = _detected_errors if !inventory_dir errors << "inventory_dir not specified." end { "ansible inventory provisioner" => errors } end |