remove str2bool, add repo_source

Replace str2bool with validate_bool as str2bool(Boolean) is only available in >= stdlib-4.0 which isn't available on any PE at this point.

Add repo_source parameter to allow overriding the source for apt/yum repos.