Ansible 2.7.8, role dependencies(github repo) in meta/main.yml are not downloaded automatically, why? still have to run ansible-galaxy install -r requirements.yml?

Ansible verison: 2.7.8

I define role B as Role A dependencies in meta/main.yml like this:

dependencies:
- { role: B, src: 'git+https://github.xxx/xxx/B.git', version: '1.0' }

When I run playbook with Role A, I suppose ansible would download Role B automatically. But not. Why?
Shall I run ansible-galaxy install -r requirements.yml firstly?

Thank you.

Yes.

When a role is installed, any dependencies are automatically installed
as well (from https://galaxy.ansible.com/docs/using/installing.html#dependencies).
Running playbooks (i.e. deploying infrastructure) does not magically
pull in remote content.

So with ansible-galaxy you make sure all the roles etc are in place.
And then you playbooks can use them.

Dick