Example #1
0
    def run(self):
        # Last sanity check... host globs all expanded?
        if not self.validate_host_globs():
            return False

        # Execute each (validated) script
        for script in self.scripts:
            runner = taboot.runner.Runner(script, self.config)
            if not runner.run():
                return False

        return True
Example #2
0
    def run(self):
        # Last sanity check... host globs all expanded?
        if not self.validate_host_globs():
            return False

        # Execute each (validated) script
        for script in self.scripts:
            runner = taboot.runner.Runner(script, self.config)
            if not runner.run():
                return False

        return True
Example #3
0
    # the data structure.
    if args.checkonly:
        exit()

    for script in scripts:
        # Add/Modify Logging if -L is given
        if addLogging:
            script.addLogging(logfile)

        # Add/Modify Concurrency if -C is given
        if args.concurrency:
            script.setConcurrency(args.concurrency[0])

        # Remove the actual preflight elements if -s is given
        if args.skippreflight:
            script.deletePreflight()

        # Print output only if -p is given
        if args.printonly:
            print script
            continue

        # Run each YAML document returned from yaml.load_all
        for runner_source in script.getYamlDoc():
            runner = taboot.runner.Runner(script)
            if not runner.run():
                break

if __name__ == '__main__':
    main()