YAML has inheritance. The most clear example I have ever seen is here: http://blog.101ideas.cz/posts/dry-your-yaml-files.html
I need something more complex: I need to ov
How about this? Use multiple anchors.
database: &default
server: &server
ip: 192.168.1.5
port: 2000
db_name: test
user: &user
name: root
password: root
foo_database:
<<: *default
server:
<< : *server
port: 2001
db_name: foo
user:
<< : *user
password: foo_root
It's just a little extra work, and slightly harder to read than if what you wanted were built into YAML as you suggested (I thought it would work that way too). But overall not bad.