From 15c3ad367c6dd19f449fcdeb80e20d9ec013f2aa Mon Sep 17 00:00:00 2001 From: Mike Marsh <mmarsh@cs.umd.edu> Date: Sat, 10 Feb 2018 11:27:52 -0500 Subject: [PATCH] more removals --- library/check_python_module | 20 -------------------- library/load_em_up | 32 -------------------------------- 2 files changed, 52 deletions(-) delete mode 100755 library/check_python_module delete mode 100644 library/load_em_up diff --git a/library/check_python_module b/library/check_python_module deleted file mode 100755 index bcfe306..0000000 --- a/library/check_python_module +++ /dev/null @@ -1,20 +0,0 @@ -#! /usr/bin/env python - -import importlib - -def main(): - module = AnsibleModule(argument_spec=dict( - name=dict(required=True,type='str'), - )) - - is_installed=False - try: - importlib.import_module( module.params['name'] ) - is_installed=True - except: - pass - - module.exit_json(changed=True, installed=is_installed) - -from ansible.module_utils.basic import * -main() diff --git a/library/load_em_up b/library/load_em_up deleted file mode 100644 index bd4a83b..0000000 --- a/library/load_em_up +++ /dev/null @@ -1,32 +0,0 @@ -#! /usr/bin/env python - -import json - -ctr_list = [] - -def parse_file(fname,select): - fd = open(fname) - j = json.load(fd) - - for entry in j['manifest']: - data = entry['data'] - if 'container' in data: - ctr = data['container'] - t = ctr['type'] - ip = ctr['docker_ip'] - name = ctr['name'] - if select is None or t == select: - ctr_list.append( { 'ip': ip, 'type': t, 'name': name } ) - -def main(): - module = AnsibleModule(argument_spec=dict( - file=dict(required=True,type='str'), - select=dict(type='str',default=None), - )) - - parse_file(module.params['file'],module.params['select']) - - module.exit_json(containers=json.dumps(ctr_list)) - -from ansible.module_utils.basic import * -main() -- GitLab