Dumping to yaml: Organizing format possible?

I’m dumping some data to yaml but the scalars? are not categorized how I
want them to be. Can reorganizing be done?

Id like to have ec1_environment and dc1_environment shown consecutively.

BEFORE:


server1.localhost:
dc1_environment:

  • production
    dc1_services:
    • service1
    • service2
    • service3
      ec1_services:
    • service4
    • service5
      ec1_environment:
    • prod

AFTER:


server1.localhost:
dc1_environment:

  • production
    ec1_environment:
    • prod
      dc1_services:
    • service1
    • service2
    • service3
      ec1_services:
    • service4
    • service5

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs