title: Ansible combine "complex" dictionary
body: <p>Let's say I have the following variables : </p>
  
  <pre><code>services:
    - name: export
      command: "php app/console export"
    - name: import
      command: "php app/console import"
  
  contextes:
    - site_name: mysite
      stages:
        - stage_name: prod
          url: http://mysite.fr
          db:
            name: mysitedb_prod
            user: myuserdb_prod
          # more and more attributes, some simple, some list, some dictionaries
        - stage_name: qualif
          url: http://qualif.mysite.fr
          db:
            name: mysitedb_qualif
            user: mysiteuser_qualif
    - site_name: my2dsite
      stages:
        - stage_name: prod
          url: http://mysite2.fr
          db:
            name: mysite2db_prod
            user: myuser2db_prod
  </code></pre>
  
  <p>I want to transform them to have the following variable structure : </p>
  
  <pre><code>my_var:
    - site_name: mysite
      stage_name: prod
      services:
        - name: export
          command: "php app/console export"
        - name: import
          command: "php app/console import"
    - site_name: mysite
      stage_name: qualif
      services:
        - name: export
          command: "php app/console export"
        - name: import
          command: "php app/console import"
    - site_name: my2dsite
      stage_name: prod
      services:
        - name: export
          command: "php app/console export"
        - name: import
          command: "php app/console import"
  </code></pre>
  
  <p>(the final purpose is to create same systemD services for all my sites/stages)</p>
  
  <p>I tried multiple thing based on set_fact and with_subelement loop.</p>
  
  <p>I tought <a href="https://stackoverflow.com/a/49772324">this answer</a> could help me but the problem is not the same and I don't understand the trnasformation made to adapt them.
  (Note if I repeat services in all site_name/stage_name it work but I would to avoid it)</p>
  
  <p>Note : I can't change the "contextes" variable structure, my all ansible infrastructure is based on.</p>
  
  <p>Thanks a lot</p>