Last active
February 4, 2021 09:15
-
-
Save matthewcosgrove/6cdee88fb804150ef2708e015b6bbc96 to your computer and use it in GitHub Desktop.
For ytt playground
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#@ load("@ytt:data", "data") | |
#@ load("@ytt:template", "template") | |
#@ def parse(deployment): | |
#@ key = "{}".format(deployment.ip) | |
#@ return {key: {"idrac_ip": "{{ inventory_hostname }}","catalog_xml": deployment.catalogXml}} | |
#@ end | |
all: | |
hosts: | |
#@ for deployment in data.values.deployments: | |
_: #@ template.replace(parse(deployment)) | |
#@ end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#@data/values | |
--- | |
deployments: | |
- ip: 10.0.0.1 | |
catalogXml: "Catalog1.xml" | |
- ip: 10.0.0.2 | |
catalogXml: "Catalog2.xml" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment