title: Where to place requirements.yml for Ansible and use it to resolve dependencies?
body: <p>I am new to ansible and was exploring dependent roles. <a href="https://docs.ansible.com/ansible/latest/reference_appendices/galaxy.html" rel="noreferrer">documentation link</a></p>
  
  <p>What I did not come across the documentation was- where to place the <code>requirements.yml</code> file.</p>
  
  <p>For instance, if my <code>site.yml</code> looks like this:</p>
  
  <pre><code>---
  - name: prepare system
    hosts: all
    roles:
       - role1
  </code></pre>
  
  <p>And, lets say </p>
  
  <ul>
  <li>role1 depends on role2 and role3</li>
  <li>role2 depends on role4 and role5</li>
  </ul>
  
  <p>Typically, ansible-galaxy  have the following structure:</p>
  
  <pre><code>└── test-role
      ├── defaults
      │   └── main.yml
      ├── files
      ├── handlers
      │   └── main.yml
      ├── meta
      │   └── main.yml
      ├── README.md
      ├── tasks
      │   └── main.yml
      ├── templates
      ├── tests
      │   ├── inventory
      │   └── test.yml
      └── vars
          └── main.yml
  </code></pre>
  
  <p>Dependencies, are added to <code>meta/main.yml</code>. Assuming, role1 has dependencies marked in this file like (and likewise for role2):</p>
  
  <pre><code>dependencies: 
    - role: role2
    - role: role3
  </code></pre>
  
  <p>And, I also have a <code>requirements.yml</code> file which looks like:</p>
  
  <pre><code>---    
  - src: some git link1
    version: master
    name: role2
  - src: some git link2
    version: master
    name: role3
  </code></pre>
  
  <p>My question: 
  where do I place this <code>requirements.yml</code> file for role1?</p>
  
  <p>I understand the requirements will need to be installed by the command,</p>
  
  <pre><code>ansible-galaxy install -r requirements.yml -p roles/
  </code></pre>
  
  <p>And, I can do this for role1, but how does this get automated for role2? Do the successive dependencies need to be resolved and installed manually this way, or is there something better?</p>