If you’re using Virtualbox or any virtualization software with GNS3, as long as your ansible host can connect to your networking devices. You should be able to run and create playbooks to manage your network devices. Make sure they are supported ny Ansible. Here’s a list of modules available: http://docs.ansible.com/ansible/latest/modules/list_of_network_modules.html
You need to add another virtual NIC to your GNS3 VM (if you are using the VM) which is on the appropriate network that Ansible has access to, create a ‘Cloud’ object in the GNS3 topology, assign the new NIC to that cloud object, then connect the device you want Ansible to reach to that cloud object. Then assign the management interface of the network device the IP address which you gave the new NIC.