- name: Verify collection dependencies executed as appropriate
  assert:
    that:
      - by_meta_loaded

- name: Use dependency defined by alias
  ansible_test.ansible_test_collection_indirect_by_needs_target.hello:
  register: by_needs_target

- name: Use dependency defined by meta
  ansible_test.ansible_test_collection_indirect_by_meta.hello:
  register: by_meta

- name: Verify the results
  assert:
    that:
      - by_needs_target.source == 'needs/target'
      - by_meta.source == 'meta'
