diff --git a/plugins/_lookup/drupal_sites_from_git.py b/plugins/_lookup/drupal_sites_from_git.py index 23da00d5a457880b017501cb7cbf64602bedc63e..61006b02fb75c583433cd4585f222096c41713e6 100644 --- a/plugins/_lookup/drupal_sites_from_git.py +++ b/plugins/_lookup/drupal_sites_from_git.py @@ -139,6 +139,7 @@ class LookupModule(LookupBase): domains = variables.get('drupal_domains') aliases = variables.get('drupal_domain_aliases') basepaths = variables.get('drupal_domain_basepaths') + borgbackup = variables.get('drupal_borgbase') domain_key = self.replace(domain_key_pattern, values) if branches and domain_key in branches: values.__setitem__("branch", branches.get(domain_key)) @@ -146,6 +147,15 @@ class LookupModule(LookupBase): values.__setitem__("aliases", aliases.get(domain_key)) if basepaths and values.get("configproject") in basepaths: values.__setitem__("basepath", basepaths.get(values.get("configproject"))) + if borgbackup: + if domain_key in borgbackup: + values.__setitem__("borg_enabled", 'yes') + values.__setitem__("borg_host", borgbackup.get(domain_key).get('borg_host')) + values.__setitem__("borg_repo", borgbackup.get(domain_key).get('borg_repo')) + else: + values.__setitem__("borg_enabled", 'no') + values.__setitem__("borg_host", '') + values.__setitem__("borg_repo", '') if domain_key in domains: domain = domains.get(domain_key) else: