3

i hava a yml-file like this:

jvm_config: 
  tomcat_port: 1066
  jvm_opts: "-Dcom.sun.management.jmxremote.port=10667"

and want to have something like this.

jvm_config: 
  tomcat_port: 1066
  jvm_opts: "-Dcom.sun.management.jmxremote.port=${tomcat_port}7"

in xml it works but how to do in yml?

thisisole
  • 115
  • 11
  • PyYAML can load this (so I expect that libyaml works). What are you using to parse it? Or did you want the value of tomcat_port to be substituted? – marshall.ward Apr 16 '13 at 23:12
  • possible duplicate of [how to reference a yaml "setting" from elsewhere in the same yaml file?](http://stackoverflow.com/questions/2063616/how-to-reference-a-yaml-setting-from-elsewhere-in-the-same-yaml-file) – Paul Sweatte Jul 03 '14 at 00:36
  • See my answer - simple approach that uses YAML custom tags - http://stackoverflow.com/a/23212501/763269 – Chris Johnson Jul 12 '14 at 19:14

0 Answers0