---
title: "Discussion on \"Automate your network labs with Ansible and GNS3 (Part 1)\" | Hashnode"
description: "Discussion on \"Automate your network labs with Ansible and GNS3 (Part 1)\". Intro\nIn Manage your GNS3 network labs programmatically with gns3fy I talked about the use of gns3fy python library to interact with GNS3 server REST API. On this blog post I will go one step further, using an ansible collections module to manipulate..."
url: "https://hashnode.com/posts/automate-your-network-labs-with-ansible-and-gns3-part-1/5d910ed4b18d2ce0046eb2e4"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Automate your network labs with Ansible and GNS3 (Part 1)](https://davidban77.hashnode.dev/automate-your-network-labs-with-ansible-and-gns3-part-1?utm_source=hashnode&utm_medium=feed)

Intro In Manage your GNS3 network labs programmatically with gns3fy I talked about the use of gns3fy python library to interact with GNS3 server REST API. On this blog post I will go one step further, using an ansible collections module to manipulate...

Sep 29, 2019 · davidban77.hashnode.dev  
Read the article

-   [#networking](https://hashnode.com/tag/networking)
-   [#ansible](https://hashnode.com/tag/ansible)
-   [#infrastructure](https://hashnode.com/tag/infrastructure)
-   [#python](https://hashnode.com/tag/python)

## Written by

[David Flores (aka: netpanda)](https://hashnode.com/@davidban77)

@davidban77 · Dublin

  
[View profile](https://hashnode.com/@davidban77)

Network Automation Geek!

I am a Network Automation Engineer with background in Telecom industry, Internet Service Providers and big retail Datacenter networking :). Currently working on software development focused on automation, leaning on the ones applied in the Network Industry

## Responses 3

Markdown supported · ⌘↵ to post

[Athaar Naqvi](https://hashnode.com/@athaarnaqvi)

[Sep 6, 2024](https://hashnode.com/posts/automate-your-network-labs-with-ansible-and-gns3-part-1/5d910ed4b18d2ce0046eb2e4/comment/66daeba56af9c2e1e6643b6d)

Hello David, I wanted to practice this lab but I have been facing this following issue for the past one week

PLAY \[localhost\] ********************************************************************************************\*********************************************************************************************

TASK \[Verify version of GNS3 server\] **********************************************************************************\*********************************************************************************** fatal: \[localhost\]: FAILED! => {"changed": false, "module\_stderr": "/bin/sh: 1: /usr/bin/env python: not found\\n", "module\_stdout": "", "msg": "The module failed to execute correctly, you probably need to set the interpreter.\\nSee stdout/stderr for the exact error", "rc": 127}

PLAY RECAP **********************************************************************************************_\*_********************************************************************************************** localhost : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

I followed your blog as it is but there seem to be a problem i will be very thankful if you guide me through this

[Nicolás Fort](https://hashnode.com/@nicolasfort)

[Nov 12, 2021](https://hashnode.com/posts/automate-your-network-labs-with-ansible-and-gns3-part-1/5d910ed4b18d2ce0046eb2e4/comment/618eb418e61d1c383da7af68)

Is this still working with newer versions? I have this versions:

-   ansible 2.11.3
-   python: 3.8.10
-   gns3: 2.2.26

While copping full playbook, it only works if just 1 link is defined. If I want to deploy more than 1 links, it doesn't work.

[João Silva](https://hashnode.com/@jnors)

[Feb 20, 2020](https://hashnode.com/posts/automate-your-network-labs-with-ansible-and-gns3-part-1/5d910ed4b18d2ce0046eb2e4/comment/5e4ecbb7205a551d167ea579)

Hello David,

First of all, thanks for this!

However, I am struggling right at the beggining of this and getting an error while running the playbook:

fatal: \[localhost\]: FAILED! => {"msg": "Unable to import gns3\_version due to invalid syntax"}

Been struggling with this for about 2 days now.

Ansible version: 2.9.4 GNS version: 2.2.5 Python version: 3.6

Hope you can help! Thanks

[David Flores (aka: netpanda)](https://hashnode.com/@davidban77)

[Feb 21, 2020](https://hashnode.com/posts/automate-your-network-labs-with-ansible-and-gns3-part-1/5d910ed4b18d2ce0046eb2e4/comment/5e4ecbb7205a551d167ea579#reply-5e4f2e768c89a92316cd9266)

Will check it out tomorrow. It should be able to run in 2.9

Maybe open a github issue and we can track it there

[David Flores (aka: netpanda)](https://hashnode.com/@davidban77)

[Feb 22, 2020](https://hashnode.com/posts/automate-your-network-labs-with-ansible-and-gns3-part-1/5d910ed4b18d2ce0046eb2e4/comment/5e4ecbb7205a551d167ea579#reply-5e511a59205a551d167ed5b9)

Hey [João Silva](https://hashnode.com/@jnors) need a little bit more info to help you there.

Can you open an issue [on the repository](https://github.com/davidban77/ansible-collection-gns3)?

Need to know:

-   Playbook you are using with the collection
-   Exact version of the collection you are using. You can find the installed collection: `ls -l ~/.ansible/collections/`

Search for the `davidban77.gns3fy/MANIFEST.json` file and you should see the version there.
