Method: Beaker::Options::Validator#validate_master_count

Defined in:
lib/beaker/options/validator.rb

#validate_master_count(count) ⇒ nil

Raise an error if the master count is incorrect.

Parameters:

  • count (Integer)

    Count of roles with ‘master’

Returns:

  • (nil)

    Nothing is returned

Raises:

  • (ArgumentError)

    Raises if master count is greater than 1



112
113
114
115
116
# File 'lib/beaker/options/validator.rb', line 112

def validate_master_count(count)
  if count > 1
    validator_error("Only one host/node may have the role 'master'.")
  end
end