"data_disks": [],
"puppet": {
"customer": "__",
- "project": "__",
+ "project": "__ <<< Check this",
"role": "default",
"tier": "__",
"environment": "__"
sample_pre_tf["defaults"]["customer"] = data["pp_owner"]["value"].split(' ')[0]
# Project
- sample_pre_tf["defaults"]["puppet"]["project"] = data["project"]["value"]
+ if "projects" in data.keys():
+ sample_pre_tf["defaults"]["puppet"]["project"] = data["project"]["value"]
# Purpose
sample_pre_tf["defaults"]["purpose"] = data["pp_purpose"]["value"].split(' ')[0]
sample_pre_tf["defaults"]["puppet"]["environment"] = data["r10k_environment"]["value"]
except Exception as e:
print("ERROR: Failed parsing required fields from output. Please check if hostname is in PuppetDB")
- # print(f"ERROR: {e}")
+ print(f"ERROR: {e}")
_exit(1)
# Print the YAML configuration file