lib/cfg_files_utils.pm

compare_settings

compare_settings({ expected => $value_1, current => value_2 })

Method validates that the given hash references contain the same data. In any other case, the data from both structures are printed, accompanied by an error message.

validate_cfg_file

validate_cfg_file($args)

Method validates content of the config file. Method allows to validate file by the line content or by providing key-pair values for the configuration files which use "KEY=PAIR" syntax.

Following structure is expected for the input: configuration_files: - path: /etc/hosts entries: - '10.226.154.19\tnew.entry.de h999uz' - '127.0.0.1\tlocalhost' - path: /etc/sysconfig/kdump settings: KDUMP_DUMPLEVEL: 31 KDUMP_DUMPFORMAT: lzo