Beispiel #1
0
    def __init__(self, display=None):
        super(CallbackModule, self).__init__(display)
        self.results = []
        self.playbook = {}
        logging_config = logconfig.load_job_config(
            os.environ['ZUUL_JOB_LOG_CONFIG'])

        self.output_path = os.path.splitext(
            logging_config.job_output_file)[0] + '.json'

        self._playbook_name = None
Beispiel #2
0
    def configure_logger(self):
        # ansible appends timestamp, user and pid to the log lines emitted
        # to the log file. We're doing other things though, so we don't want
        # this.
        logging_config = logconfig.load_job_config(
            os.environ['ZUUL_JOB_LOG_CONFIG'])

        if self._display.verbosity > 2:
            logging_config.setDebug()

        logging_config.apply()

        self._logger = logging.getLogger('zuul.executor.ansible')
Beispiel #3
0
    def configure_logger(self):
        # ansible appends timestamp, user and pid to the log lines emitted
        # to the log file. We're doing other things though, so we don't want
        # this.
        logging_config = logconfig.load_job_config(
            os.environ['ZUUL_JOB_LOG_CONFIG'])

        if self._display.verbosity > 2:
            logging_config.setDebug()

        logging_config.apply()

        self._logger = logging.getLogger('zuul.executor.ansible')
Beispiel #4
0
    def __init__(self, display=None):
        super(CallbackModule, self).__init__(display)
        self.results = []
        self.output = []
        self.playbook = {}
        logging_config = logconfig.load_job_config(
            os.environ['ZUUL_JOB_LOG_CONFIG'])

        self.output_path = os.path.splitext(
            logging_config.job_output_file)[0] + '.json'

        # For now, just read in the old file and write it all out again
        # This may well not scale from a memory perspective- but let's see how
        # it goes.
        if os.path.exists(self.output_path):
            self.output = json.load(open(self.output_path, 'r'))
        self._playbook_name = None