title: Hidden reusable blocks in YAML
body: <p>I am trying to define a reusable block in a <code>docker-compose.yml</code> file in a way that the reusable block definition itself is NOT included in the final (evaluated) YAML.</p>
  
  <p>I know how to define a reusable block with this syntax:</p>
  
  <pre><code>services:
    default: &amp;default
      image: some/image
  
    dashboard:
      &lt;&lt;: *default
      command: run dashboard
      ports: ["3000:3000"]
  </code></pre>
  
  <p>But, the above also creates an entry named <code>default</code> under services, which I would like to avoid. In other words, I need the final YAML result to only include <code>dashboard</code> under the <code>services</code> property.</p>
  
  <p>Is this possible with YAML? I was unable to find any reference that discusses this structure clearly enough.</p>
  
  <p>Intuitively, I have tried some variations of the below, but it also did not work.</p>
  
  <pre><code>services:
    &amp;default:
      image: some/image
  
    dashboard:
      &lt;&lt;: *default
      command: run dashboard
      ports: ["3000:3000"]
  </code></pre>