Last active
December 14, 2020 11:48
-
-
Save dnmgns/e6620c050c3b6fe9a445d66fb3c034dc to your computer and use it in GitHub Desktop.
ytt data value into multiline string
This file contains 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 | |
--- | |
user: 'johndoe' |
This file contains 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
startup: | |
user.sh: | | |
/opt/user.sh --user johndoe |
This file contains 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:yaml", "yaml") | |
#@ load("@ytt:data", "data") | |
#@ def user(): | |
--- | |
#@ "/opt/user.sh --user " + data.values.user | |
--- | |
#@ end | |
--- | |
startup: | |
user.sh: #@ yaml.encode(user()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment