zahodi.ansible-mikrotik/README.md

62 lines
1.7 KiB
Markdown
Raw Permalink Normal View History

Ansible MikroTik modules
========================
Introduction
------------
This repository provides Ansible modules to manage MikroTik RouterOS-based
devices.
Requirements
------------
2018-01-29 17:04:35 -08:00
Ansible=2.4.2.0
At this time there are no external dependencies. However, there are additional
Python modules that are required by the Ansible modules. You may find these in
`pythonlibs`. Before using Ansible you should add these libraries to your
Python path:
`export PYTHONPATH="$PYTHONPATH:$PWD/pythonlibs"`
Development
-----------
2018-01-29 17:04:35 -08:00
-----------
In order to test this module, you'll need a RouterOS instance to target. If you
have an existing RouterOS-based MikroTik device, you need only make sure the
API service is enabled.
2018-01-29 17:04:35 -08:00
AWS EC2
-------
2018-01-30 14:11:47 -08:00
You can use an ec2 CHR image for testing. Keep in mind that as of right now we can only set up two interfaces on most ec2 instances.
2018-01-29 17:04:35 -08:00
https://aws.amazon.com/marketplace/pp/B01E00PU50?qid=1517274040207&sr=0-1&ref_=srh_res_product_title
Vagrant
-------
This repository provides a Vagrantfile for setting up the x86 build
of RouterOS for testing. To use it, you must first ensure Vagrant and
VirtualBox are installed. Then, run `./create_vagrant_mikrotik.sh` to download
the official MikroTik Cloud Hosted Router (CHR) image from MikroTik, package
it as a Vagrant .box file, and register the .box with Vagrant.
Then, you need only run `vagrant up` in the repository root to start the CHR.
2018-01-29 17:04:35 -08:00
Ansible setup
------------
2018-01-09 10:31:12 -08:00
To use pipenv ensure pipenv is installed:
2018-01-09 10:54:13 -08:00
2018-01-09 10:31:12 -08:00
`pip install pipenv`
Then enable virtualenv and install dependencies:
2018-01-09 10:54:13 -08:00
2018-01-09 10:31:12 -08:00
`pipenv shell`
2018-01-09 10:57:15 -08:00
2018-01-09 10:31:12 -08:00
`pipenv install`
Installing
----------
These modules are still in a very early stage of development; stay tuned for
installation instructions later! :)