Is there any way to share a configuration between environments in a manifest file?

My manifest.yml file currently looks like this:

production:
        sinatra:
            server:
                unique_name: web1
                vendor: linode
                region: Dallas, TX, USA
                size: Linode 1024
            configuration:
                ruby_version: 2.1.2
    development:
        sinatra:
            server:
                unique_name: web1
                vendor: linode
                region: Dallas, TX, USA
                size: Linode 1024
            configuration:
                ruby_version: 2.1.2
    staging:
        sinatra:
            server:
                unique_name: web1
                vendor: linode
                region: Dallas, TX, USA
                size: Linode 1024
            configuration:
                ruby_version: 2.1.2

Is there any way to simplify this so that I don’t have to repeat the same thing in every environment?

You can indeed! That would look like this:

common: &common
    sinatra:
        server:
            unique_name: web1
            vendor: linode
            region: Dallas, TX, USA
            size: Linode 1024
        configuration:
            ruby_version: 2.1.2
production:
    <<: *common
development:
    <<: *common
staging:
    <<: *common 

You must be logged in to answer this question