添加keys 发布接口

This commit is contained in:
pengtao 2019-11-05 13:55:18 +08:00
parent 5716f42295
commit c5f111a2f5

View File

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from ops.mmysql import MysqlBase
from ops.mansible import AnsibleAPI
from ops.mylog import define_logger
from ops.mlog import define_logger
import logging
import datetime
import os
@ -11,11 +11,11 @@ import shutil
define_logger("/data/logs/ops/deploy_keys.log")
log = logging.getLogger(__name__)
args = dict()
args['host'] = '10.10.3.5'
args['user'] = 'ops'
args['pswd'] = 'deploy2018'
args['db'] = 'ywplatform'
dbargs = dict()
dbargs['host'] = '10.10.3.5'
dbargs['user'] = 'ops'
dbargs['pswd'] = 'deploy2018'
dbargs['db'] = 'ywplatform'
class DeployKeys:
@ -55,7 +55,7 @@ class DeployKeys:
project_name="{self.project}"
and env='{self.env}'"""
mydb = MysqlBase(**args)
mydb = MysqlBase(**dbargs)
data = mydb.query(sql)
ip_addr = list()
if data: