Skip to content
Snippets Groups Projects
Commit b14315a2 authored by Chris Hines's avatar Chris Hines
Browse files

don't use python 3.9syntax

parent f01e3b1a
No related branches found
No related tags found
3 merge requests!518modifications to playbooks because 1. we're not using ldap 2. we're mounting...,!517modifications to playbooks because 1. we're not using ldap 2. we're mounting...,!513modifications to playbooks because 1. we're not using ldap 2. we're mounting...
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment