fortios config backup - can someone help me understand this please

https://docs.ansible.com/ansible/latest/collections/fortinet/fortios/fortios_system_config_backup_restore_module.html

using the example from the documentation above
I dont understand why hosts is set to locahosts and I need to specify a host with its IP.

hosts: localhost
connection: httpapi
collections: - fortinet.fortios
vars: vdom: “root”
host: “192.168.122.60”

usually the hosts are in the hosts file but when I change
hosts: localhost
to
hosts: fortigates for example and remove the host entry the playbook will not run anymore.

Thanks