|
|
@ -71,11 +71,15 @@ if __name__ == '__main__':
|
|
|
|
mycli = getattr(__import__("ansible.cli.%s" % sub, fromlist=[myclass]), myclass)
|
|
|
|
mycli = getattr(__import__("ansible.cli.%s" % sub, fromlist=[myclass]), myclass)
|
|
|
|
elif me == 'ansible':
|
|
|
|
elif me == 'ansible':
|
|
|
|
from ansible.cli.adhoc import AdHocCLI as mycli
|
|
|
|
from ansible.cli.adhoc import AdHocCLI as mycli
|
|
|
|
|
|
|
|
else:
|
|
|
|
cli = mycli(sys.argv, display=display)
|
|
|
|
raise AnsibleError("Unknown Ansible alias: %s" % me)
|
|
|
|
except (ImportError,NameError):
|
|
|
|
except ImportError as e:
|
|
|
|
raise AnsibleError("Ansible sub-program not implemented: %s" % me)
|
|
|
|
if e.message.endswith(' %s' % sub):
|
|
|
|
|
|
|
|
raise AnsibleError("Ansible sub-program not implemented: %s" % me)
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
raise
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cli = mycli(sys.argv, display=display)
|
|
|
|
cli.parse()
|
|
|
|
cli.parse()
|
|
|
|
sys.exit(cli.run())
|
|
|
|
sys.exit(cli.run())
|
|
|
|
|
|
|
|
|
|
|
|