Sha256: 96d9f928a0622a2beaff5f0c3b50493ebb70c92692ebea023de3ee871499e3cf
Contents?: true
Size: 906 Bytes
Versions: 1
Compression:
Stored size: 906 Bytes
Contents
#!/usr/bin/python import os def main(): module = AnsibleModule( argument_spec = dict( path = dict(required=True, type='str'), ), supports_check_mode = False, ) facts = {} changed = False path = module.params.get('path') path_parts = path.split('/') dir = os.path.join(*path_parts[:-1]) dashed = "-".join(path_parts) class_name = "".join([s.capitalize() for s in path_parts]) facts['component_dir'] = dir facts['component_dashed'] = dashed facts['component_class_name'] = class_name facts['component_logger_name'] = ":".join(['imports', 'ui'] + path_parts) module.exit_json( changed = changed, ansible_facts = facts, ) # import module snippets from ansible.module_utils.basic import * from ansible.module_utils.known_hosts import * if __name__ == '__main__': main()
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
qb-0.1.9 | roles/qb.meteor_react_component/library/component_facts.py |