# role take wrong collection fortigate

**URL:** <https://forum.ansible.com/t/role-take-wrong-collection-fortigate/35842>\
**Category:** Ansible Project\
**Created:** [October 11, 2021, 8:24am UTC](https://forum.ansible.com/t/role-take-wrong-collection-fortigate/35842 "2021-10-11T08:24:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cava\_cavamagie](https://avatars.discourse-cdn.com/v4/letter/c/e68b1a/32.png) [@cava\_cavamagie](https://forum.ansible.com/u/cava_cavamagie)\
**Post date:** [October 11, 2021, 8:24am UTC](https://forum.ansible.com/t/role-take-wrong-collection-fortigate/35842/1 "2021-10-11T08:24:48Z")

</div>

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
