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 |
# File 'lib/vai/config.rb', line 7 def initialize @inventory_dir = 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
12 13 14 15 |
# File 'lib/vai/config.rb', line 12 def finalize! @inventory_dir = nil if @inventory_dir == UNSET_VALUE @groups = {} if @groups == UNSET_VALUE end |
#validate(machine) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/vai/config.rb', line 17 def validate(machine) errors = _detected_errors if !inventory_dir errors << "inventory_dir not specified." end { "ansible inventory provisioner" => errors } end |