Comments (10)
It looks like you have an issue on your /root/.ansible/mazer.yml
file configuration.
Can you take a look at your mazer file?. Here is an example one from Ansible doc:
version: 1
server:
ignore_certs: false
url: https://galaxy-qa.ansible.com
api_key: da39a3ee5e6b4b0d3255bfef95601890afd80709
collections_path: ~/.ansible/collections
global_collections_path: /usr/share/ansible/collections
The error says mapping values are not allowed here
, so my guess is that some variable is not set correctly
from ansible-collection-gns3.
Also, could it be that mazer
was not installed correctly? Can you run pip install mazer
to validate the installation went well?
FYI: Mazer is the command line new in 2.8 to install Ansible Collections like this one. If you want more info
from ansible-collection-gns3.
this is the mazer installation:
pip3 install mazer
Requirement already satisfied: mazer in /usr/local/lib/python3.6/site-packages (1.0.0)
Requirement already satisfied: jinja2 in /usr/local/lib/python3.6/site-packages (from mazer) (2.10.1)
Requirement already satisfied: semantic-version in /usr/local/lib/python3.6/site-packages (from mazer) (2.8.2)
Requirement already satisfied: attrs>=18.1.0 in /usr/local/lib/python3.6/site-packages (from mazer) (19.1.0)
Requirement already satisfied: yamlloader in /usr/local/lib/python3.6/site-packages (from mazer) (0.5.5)
Requirement already satisfied: requests in /usr/local/lib/python3.6/site-packages (from mazer) (2.22.0)
Requirement already satisfied: PyYaml in /usr/local/lib64/python3.6/site-packages (from mazer) (5.1.2)
Requirement already satisfied: six in /usr/local/lib/python3.6/site-packages (from mazer) (1.12.0)
Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib64/python3.6/site-packages (from jinja2->mazer) (1.1.1)
Requirement already satisfied: idna<2.9,>=2.5 in /usr/local/lib/python3.6/site-packages (from requests->mazer) (2.8)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/site-packages (from requests->mazer) (2019.9.11)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.6/site-packages (from requests->mazer) (3.0.4)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.6/site-packages (from requests->mazer) (1.25.6)
and the .ansible/mazer.yml I have the same output you have mentioned in the .ansible/mazer.yml or should the api-key be different?
from ansible-collection-gns3.
It will be different when you submit code to Ansible galaxy. So you don't need to worry about that for this case.
Now, is the ansible
and mazer
installed in the same python environment?
I see that before you ran pip install gns3fy mazer
and the output above is from pip3 install mazer
, could it be that the mazer and ansible are in different python versions/environments?
from ansible-collection-gns3.
Yes they are both on the same python env:
(mypython3) root@server1:~ ✔ pip3 install ansible
Requirement already satisfied: ansible in ./mypython3/lib/python3.6/site-packages (2.8.5)
Requirement already satisfied: cryptography in ./mypython3/lib/python3.6/site-packages (from ansible) (2.7)
Requirement already satisfied: PyYAML in ./mypython3/lib/python3.6/site-packages (from ansible) (5.1.2)
Requirement already satisfied: jinja2 in ./mypython3/lib/python3.6/site-packages (from ansible) (2.10.1)
Requirement already satisfied: cffi!=1.11.3,>=1.8 in ./mypython3/lib/python3.6/site-packages (from cryptography->ansible) (1.12.3)
Requirement already satisfied: asn1crypto>=0.21.0 in ./mypython3/lib/python3.6/site-packages (from cryptography->ansible) (0.24.0)
Requirement already satisfied: six>=1.4.1 in ./mypython3/lib/python3.6/site-packages (from cryptography->ansible) (1.12.0)
Requirement already satisfied: MarkupSafe>=0.23 in ./mypython3/lib/python3.6/site-packages (from jinja2->ansible) (1.1.1)
Requirement already satisfied: pycparser in ./mypython3/lib/python3.6/site-packages (from cffi!=1.11.3,>=1.8->cryptography->ansible) (2.19)
(mypython3) root@server1:~ ✔ pip3 install mazer
Requirement already satisfied: mazer in ./mypython3/lib/python3.6/site-packages (1.0.0)
Requirement already satisfied: attrs>=18.1.0 in ./mypython3/lib/python3.6/site-packages (from mazer) (19.2.0)
Requirement already satisfied: yamlloader in ./mypython3/lib/python3.6/site-packages (from mazer) (0.5.5)
Requirement already satisfied: PyYaml in ./mypython3/lib/python3.6/site-packages (from mazer) (5.1.2)
Requirement already satisfied: requests in ./mypython3/lib/python3.6/site-packages (from mazer) (2.22.0)
Requirement already satisfied: jinja2 in ./mypython3/lib/python3.6/site-packages (from mazer) (2.10.1)
Requirement already satisfied: six in ./mypython3/lib/python3.6/site-packages (from mazer) (1.12.0)
Requirement already satisfied: semantic-version in ./mypython3/lib/python3.6/site-packages (from mazer) (2.8.2)
Requirement already satisfied: certifi>=2017.4.17 in ./mypython3/lib/python3.6/site-packages (from requests->mazer) (2019.9.11)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in ./mypython3/lib/python3.6/site-packages (from requests->mazer) (3.0.4)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in ./mypython3/lib/python3.6/site-packages (from requests->mazer) (1.25.6)
Requirement already satisfied: idna<2.9,>=2.5 in ./mypython3/lib/python3.6/site-packages (from requests->mazer) (2.8)
Requirement already satisfied: MarkupSafe>=0.23 in ./mypython3/lib/python3.6/site-packages (from jinja2->mazer) (1.1.1)
(mypython3) root@server1:~ ✔ pip3 install gns3fy
Requirement already satisfied: gns3fy in ./mypython3/lib/python3.6/site-packages (0.5.2)
Requirement already satisfied: pydantic in ./mypython3/lib/python3.6/site-packages (from gns3fy) (0.32.2)
Requirement already satisfied: requests<3.0,>=2.22 in ./mypython3/lib/python3.6/site-packages (from gns3fy) (2.22.0)
Requirement already satisfied: dataclasses>=0.6; python_version < "3.7" in ./mypython3/lib/python3.6/site-packages (from pydantic->gns3fy) (0.6)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in ./mypython3/lib/python3.6/site-packages (from requests<3.0,>=2.22->gns3fy) (1.25.6)
Requirement already satisfied: certifi>=2017.4.17 in ./mypython3/lib/python3.6/site-packages (from requests<3.0,>=2.22->gns3fy) (2019.9.11)
Requirement already satisfied: idna<2.9,>=2.5 in ./mypython3/lib/python3.6/site-packages (from requests<3.0,>=2.22->gns3fy) (2.8)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in ./mypython3/lib/python3.6/site-packages (from requests<3.0,>=2.22->gns3fy) (3.0.4)
from ansible-collection-gns3.
How does you ansible playbook look like?.
Also can you paste the ansible --version
?
I will try to replicate on a docker environment
from ansible-collection-gns3.
Even though installing the module still gives this error but I still can use the module.
The error:
(mypython3) root@server1:~ ✔ mazer install davidban77.gns3
Error loading configuration file /root/.ansible/mazer.yml:
mapping values are not allowed here
in "/root/.ansible/mazer.yml", line 4, column 16
This playbook is for closing a project, and it works fine:
(mypython3) root@server1:~ ✔ ansible-playbook gns3_ansible.yml
PLAY [test gns3 with ansible]
TASK [Stop lab] *********************************************************************************************************
changed: [localhost]
PLAY RECAP **************************************************************************************************************
localhost : ok=3 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
(mypython3) root@server1:~ ✔ ansible --version
ansible 2.8.5
config file = /root/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /root/mypython3/lib/python3.6/site-packages/ansible
executable location = /root/mypython3/bin/ansible
python version = 3.6.8 (default, Aug 7 2019, 17:28:10) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
from ansible-collection-gns3.
So it should be ok, a good "keepalive" test is to get the server version.
I added a new module gns3_facts
which should get the info of the server.
Take a look at this
from ansible-collection-gns3.
Thank you very much I appreciate it :).
from ansible-collection-gns3.
@nabilovski is that now working for you?
from ansible-collection-gns3.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-collection-gns3.