| def run_section(self, section_name): | |
| raw_mods = self._read_modules(section_name) | |
| mostly_mods = self._fixup_modules(raw_mods) | |
| d_name = self.init.distro.name | |
| skipped = [] | |
| forced = [] | |
| overridden = self.cfg.get('unverified_modules', []) | |
| for (mod, name, _freq, _args) in mostly_mods: | |
| worked_distros = set(mod.distros) | |
| worked_distros.update( | |
| distros.Distro.expand_osfamily(mod.osfamilies)) | |
| # module does not declare 'distros' or lists this distro | |
| if not worked_distros or d_name in worked_distros: | |
| continue | |
| if name in overridden: | |
| forced.append(name) | |
| else: | |
| skipped.append(name) | |
| if skipped: | |
| LOG.info("Skipping modules %s because they are not verified " | |
| "on distro '%s'. To run anyway, add them to " | |
| "'unverified_modules' in config.", skipped, d_name) | |
| if forced: | |
| LOG.info("running unverified_modules: %s", forced) | |
| return self._run_modules(mostly_mods) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment