Skip to content
Snippets Groups Projects
Select Git revision
  • f2d698b8d23740336edae4d12baa9807fc770821
  • master default protected
  • v1.14.7
  • v1.14.6
  • v1.14.5
  • v1.14.4
  • v1.14.3
  • v1.14.2
  • v1.14.1
  • v1.14.0
  • v1.13.2
  • v1.13.1
  • v1.13.0
  • v1.12.1
  • v1.12.0
  • v1.11.1
  • v1.11.0
  • v1.10.0
  • v1.9.2
  • v1.9.1
  • v1.9.0
  • v1.8.4
22 results

setup.py

Blame
  • create_action_group.py 633 B
    import sys
    import yaml
    from facts import MANAGEMENT_MODULES
    
    
    def create_action_group(yml_file, project_prefix):
        yaml_data = None
        with open(yml_file) as f_in:
            yaml_data = yaml.safe_load(f_in)
    
        yaml_data.setdefault("action_groups", {})[
            "%s.modules" % project_prefix
        ] = MANAGEMENT_MODULES
    
        with open(yml_file, 'w') as f_out:
            yaml.safe_dump(yaml_data, f_out, default_flow_style=False,
                           explicit_start=True)
    
    
    if len(sys.argv) != 3:
        print("Usage: %s <runtime file> <collection prefix>" % sys.argv[0])
        sys.exit(-1)
    
    create_action_group(sys.argv[1], sys.argv[2])