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.
-
#inventory_filename ⇒ Object
Returns the value of attribute inventory_filename.
Instance Method Summary collapse
- #finalize! ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #validate(machine) ⇒ Object
Constructor Details
#initialize ⇒ Config
8 9 10 11 12 |
# File 'lib/vai/config.rb', line 8 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.
6 7 8 |
# File 'lib/vai/config.rb', line 6 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 |
#inventory_filename ⇒ Object
Returns the value of attribute inventory_filename.
5 6 7 |
# File 'lib/vai/config.rb', line 5 def inventory_filename @inventory_filename end |
Instance Method Details
#finalize! ⇒ Object
14 15 16 17 18 |
# File 'lib/vai/config.rb', line 14 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
20 21 22 23 24 25 26 27 |
# File 'lib/vai/config.rb', line 20 def validate(machine) errors = _detected_errors if !inventory_dir errors << "inventory_dir not specified." end { "ansible inventory provisioner" => errors } end |