# !/usr/bin/env python
# -*- coding: utf-8 -*-
import MySQLdb
from datetime import datetime
import cx_Oracle
import os
import xlwt
import sys
import commands
reload(sys)
sys.setdefaultencoding('utf-8')
os.environ['NLS_LANG'] = 'SIMPLIFIED CHINESE_CHINA.UTF8'
vdate='20180828'
esbtag='in'
response=[]
cmd ='ls /app/esb/esblog/%s/%s/[0-9]{1,}*.log*' %(esbtag,vdate)
print cmd
xxx="ansible -i /etc/ansible/hosts esbgroup1 -u esb -m shell -a '%s'" %(cmd)
print xxx
response=commands.getoutput(xxx)
print response
print type(response)