diff --git a/CICD/make_files.py b/CICD/make_files.py index c5faff0bb05f0a13edede0be364c8b6bd0292b66..d49fa78b8a7f6b37d3d9c93e87c06c637dcf6de2 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)