Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation #3

Open
Faceless28 opened this issue Sep 16, 2018 · 1 comment
Open

Installation #3

Faceless28 opened this issue Sep 16, 2018 · 1 comment

Comments

@Faceless28
Copy link

Faceless28 commented Sep 16, 2018

Can u plz help to install module and use it?

@chitizs
Copy link

chitizs commented Dec 10, 2018

A file is not there anymore in default ansible and python installation, and some path for library needs modification.

It worked for me after changing following lines in two files.

1. In library/routeros_command.py lines

from ansible.module_utils.network_common import ComplexList
is changed to
from ansible.module_utils.network.common.utils import ComplexList

Also netcli.py is not there, so downloaded from
https://code.vt.edu/nis-ansible-roles/upstream-ansible/blob/da6f6d27e8bc05b1d7df79eab77e1d3d11493a12/lib/ansible/module_utils/netcli.py

2. In file library/routeros_utils.py

from ansible.module_utils.network_common import ComplexList
is changed to
from ansible.module_utils.network.common.utils import to_list, ComplexList

Also, following file contains the commands to be fired in corresponding nodes
cat test/integration/roles/routeros_command/tests/api/output.yaml
...
routeros_command:
commands:
- /system resource print
- /interface print
- /interface ethernet enable numbers=ether10
provider: "{{ api }}"
.....
You can change this section to fire different commands, also keep eye on following parameters
- result.stdout | length == 3

run following
export ANSIBLE_LIBRARY=$PWD/library
export PYTHONPATH=$ANSIBLE_LIBRARY
ansible-playbook -i temp/inventory test/integration/routeros.yaml

Regards,
Tiz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants