role take wrong collection fortigate

I have to use a fortigate collection.

if I run all in a playbook

— - hosts: fortigates collections: - fortinet.fortios connection: httpapi vars: vdom: “root” ansible_httpapi_use_ssl: yes ansible_httpapi_validate_certs: no ansible_httpapi_port: 443 tasks: - name: Configure global attributes. fortios_system_global: vdom: “{{ vdom }}” system_global: admintimeout: “23” hostname: “FortiGate02”

All works fine.

But if I create a role and I add the task in the taskfile, the play uses an other version of the collection.

Any idea?

I have added the collection

collections: - fortinet.fortios

in the meta/main.yml