- name: Retrieve a repository from a distant location and make it available locally
  ansible.scm.git_retrieve:
    origin:
      url: https://github.com/ansible-collections/ansible.scm.git
      token: ABCDEF
    timeout: 5
  register: repository
  ignore_errors: true

- name: Confirm the return code and message
  ansible.builtin.assert:
    that:
      - repository["output"][0]["return_code"] != 0
