2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-29 04:50:21 +00:00

Merge pull request #90 from sjtstg/ansible-fixes

Ansible fixes
This commit is contained in:
Jarrod Johnson 2023-07-05 16:15:30 -04:00 committed by GitHub
commit afc78513a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -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)

View File

@ -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