def load_templates()

in apps/replikate/src/main.py [0:0]


def load_templates(_=None):
  """Reads file content and stores it as a variable"""
  global TEMPLATES
  result = []
  # logging.info(f"Loading manifests from {dir}")
  jinja = Environment(loader=FileSystemLoader(CONFIG_DIR, followlinks=True))
  for file in glob(path.join(CONFIG_DIR, "*.yaml")):
    if path.isdir(file): continue
    try:
      t_name = path.relpath(file, CONFIG_DIR)
      template = jinja.get_template(t_name)
    except:
      logging.debug(f"* Skipping {file}")
      continue
    logging.info(f"* loading template: {file}")
    result.append(template)
  TEMPLATES = result