How can I do string concatenation, or string replacement in YAML?

You can use a repeated node, like this:

user_dir: &user_home /home/user
user_pics: *user_home

I don’t think you can concatenate though, so this wouldn’t work:

user_dir: &user_home /home/user
user_pics: *user_home/pics

Leave a Comment