perf: 支持数据库网域执行Task

This commit is contained in:
jiangweidong
2023-02-21 20:27:44 +08:00
parent f46b707f70
commit def5989cdc
3 changed files with 60 additions and 16 deletions

View File

@@ -131,13 +131,10 @@ class JMSInventory:
if ansible_connection == 'local':
if gateway:
host['ansible_host'] = gateway.address
host['ansible_port'] = gateway.port
host['ansible_user'] = gateway.username
host['ansible_password'] = gateway.password
host['ansible_connection'] = 'smart'
else:
host['ansible_connection'] = 'local'
host['gateway'] = {
'address': gateway.address, 'port': gateway.port,
'username': gateway.username, 'secret': gateway.password
}
else:
self.make_ssh_account_vars(host, asset, account, automation, protocols, platform, gateway)
return host