from teuthology.task import Task
-log = logging.getLogger(__name__)
-
+log = logging.Logger(__name__)
+log.setLevel(logging.INFO)
class LoggerFile(object):
"""
self.log = log
self.generated_inventory = False
self.generated_playbook = False
+ log.addHandler(logging.FileHandler(os.path.join(ctx.archive,
+ "ansible.log")))
def setup(self):
super(Ansible, self).setup()
command = ' '.join(args)
log.debug("Running %s", command)
- out_log = self.log.getChild('out')
out, status = pexpect.run(
command,
cwd=self.repo_path,
- logfile=_logfile or LoggerFile(out_log, logging.INFO),
+ logfile=_logfile or LoggerFile(log, logging.INFO),
withexitstatus=True,
timeout=None,
)
self.ctx.cluster.add(Remote('user@remote2'), ['role2'])
self.ctx.config = dict()
self.ctx.summary = dict()
+ self.ctx.archive = '../'
self.task_config = dict(playbook=[])
self.start_patchers()
self.ctx.cluster.add(Remote('user@remote3'), ['osd.0'])
self.ctx.summary = dict()
self.ctx.config = dict()
+ self.ctx.archive = '../'
self.task_config = dict()
self.start_patchers()