4 Commits

Author SHA1 Message Date
Ben Vincent e80706d3db Merge pull request 'fix: enc outputs *id001 in class/environment' (#24) from neoloc/enc_script_id001 into master
Reviewed-on: #24
2023-11-05 16:22:59 +09:30
unkinben 814b4e59b4 fix: enc outputs *id001 in class/environment
- the slice notation [:] creates a shallow copy of the list
- when dumping the data, it will not use the anchors and aliases because it
treats the values in enc_role and classes as separate lists
2023-11-05 17:51:28 +11:00
Ben Vincent ec3f431b45 Merge pull request 'feat: add packagerepo host prodinf01n22' (#23) from neoloc/packagerepo into master
Reviewed-on: #23
2023-11-05 14:22:33 +09:30
unkinben 1b90f54a6e feat: add packagerepo host prodinf01n22 2023-11-05 15:50:17 +11:00
2 changed files with 6 additions and 2 deletions
+4
View File
@@ -0,0 +1,4 @@
---
classes:
- roles::infra::packagerepo
environment: testing
+2 -2
View File
@@ -34,11 +34,11 @@ def main():
# Add 'enc_role' parameter with classes data
if "classes" in data:
data["parameters"]["enc_role"] = data["classes"]
data["parameters"]["enc_role"] = data["classes"][:]
# Copy the environment to the parameters, if it exists
if data.get("environment"):
data["parameters"]["enc_env"] = data["environment"]
data["parameters"]["enc_env"] = data["environment"][:]
# If the environment is 'testing', remove it
if data.get("environment") == "testing":