mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-29 04:50:21 +00:00
commit
afc78513a1
@ -162,8 +162,9 @@ if __name__ == '__main__':
|
||||
if os.path.exists('/etc/ansible/hosts'):
|
||||
aninv = InventoryManager(loader=loader, sources='/etc/ansible/hosts')
|
||||
anshost = aninv.get_host(sys.argv[1])
|
||||
if anshost:
|
||||
invman = aninv
|
||||
if not anshost:
|
||||
aninv.add_host(sys.argv[1])
|
||||
invman = aninv
|
||||
if not invman:
|
||||
invlist = sys.argv[1] + ','
|
||||
invman = InventoryManager(loader=loader, sources=invlist)
|
||||
|
@ -570,7 +570,7 @@ def get_scriptlist(scriptcat, cfg, nodename, pathtemplate):
|
||||
if not os.path.isdir(target) and os.path.isdir(target + '.d'):
|
||||
target = target + '.d'
|
||||
try:
|
||||
slist = os.listdir(target)
|
||||
slist = sorted(os.listdir(target))
|
||||
except OSError:
|
||||
pass
|
||||
return slist, profile
|
||||
|
Loading…
Reference in New Issue
Block a user