Example #1
0
 def _handle_missing_value(cls, yaml_file, section, option_name, exp_value,
                           critical):
     msg = "There is an issue with Ansible configuration in" \
           " {}. Option '{}' with value of '{}' not found in" \
           " section '{}'".format(yaml_file, option_name,
                                  exp_value, section)
     if critical:
         raise IRValidatorException(msg)
     else:
         logger.warn(msg)
Example #2
0
 def _handle_wrong_value(cls, yaml_file, option_name, exp_value, cur_value,
                         critical):
     msg = "There is an issue with Ansible configuration in " \
           "{}. Expected value for the option '{}' is '{}', " \
           "current value is '{}'".format(yaml_file, option_name,
                                          exp_value, cur_value)
     if critical:
         raise IRValidatorException(msg)
     else:
         logger.warn(msg)