From b14315a2a9c18cff0891ed01270c2046d0caf92a Mon Sep 17 00:00:00 2001
From: Chris Hines <chris.hines@monash.edu>
Date: Sat, 9 Oct 2021 13:21:13 +1100
Subject: [PATCH] don't use python 3.9syntax

---
 CICD/make_files.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/CICD/make_files.py b/CICD/make_files.py
index c5faff0b..d49fa78b 100644
--- a/CICD/make_files.py
+++ b/CICD/make_files.py
@@ -72,7 +72,8 @@ def make_vars_filesystems(choices, inventory):
 
 def make_ssh_cfg(choices, inventory):
     import jinja2
-    data = choices | inventory
+    #data = choices | inventory
+    data = { **choices, **inventory }
     bastion_server = "{}-bastion0".format(choices['project_name'])
     ansible_user = inventory['all']['children']['hostvars']['hosts'][bastion_server]['ansible_user']
     bastion_floating_ip = inventory['all']['children']['hostvars']['hosts'][bastion_server]['ext_ip']
@@ -122,7 +123,8 @@ def make_slurm_config(choices, inventory):
     with open('vars/slurm.yml') as f:
         slurmvars = yaml.safe_load(f.read())
     slurmvars['groups'] = groups
-    slurmvars = slurmvars | choices
+    #slurmvars = slurmvars | choices
+    slurmvars = { **slurmvars, **choices }
     with open('pre_templates/slurm.conf.j2') as f:
         template = jinja2.Template(f.read())
     with open('files/slurm.conf','w') as f:
@@ -196,14 +198,14 @@ def main():
     with open(sys.argv[3]) as f:
         versions = yaml.safe_load(f.read())
 
-    choices = choices | versions
+    choices = { **choices, **versions }
 
     init_cluster(inventory)
 
     with open('vars/passwords.yml') as f:
         passwords = yaml.safe_load(f.read())
 
-    choices = choices | passwords
+    choices = { **choices, **passwords }
 
     derive_ansible_constants(choices, inventory)
 
-- 
GitLab