Ansible modules for managing MikroTik RouterOS instances.
Find a file
2020-10-26 20:24:36 +01:00
.github/workflows Simplify CI matrix. 2020-10-26 15:22:54 +01:00
changelogs Add release summary. 2020-10-26 15:22:54 +01:00
meta Add collection template. 2020-10-26 15:18:40 +01:00
plugins Improve documentation. This way, antsiull-docs is mentioned the result values as 'facts' and not as regular return values. 2020-10-26 20:24:31 +01:00
tests Initial cleanup. 2020-10-26 15:18:40 +01:00
.gitignore Add collection template. 2020-10-26 15:18:40 +01:00
CHANGELOG.rst Add collection template. 2020-10-26 15:18:40 +01:00
COPYING Initial cleanup. 2020-10-26 15:18:40 +01:00
galaxy.yml Initial cleanup. 2020-10-26 15:18:40 +01:00
README.md Add usage example. 2020-10-26 20:24:36 +01:00

Community RouterOS Collection

CI Codecov

Provides modules for Ansible to manage MikroTik RouterOS instances.

Tested with Ansible

Tested with both the current Ansible 2.9 and 2.10 releases and the current development version of Ansible. Ansible versions before 2.9.10 are not supported.

External requirements

The exact requirements for every module are listed in the module documentation.

Supported connections

The collection supports the network_cli connection.

Included content

  • community.routeros.api
  • community.routeros.command
  • community.routeros.facts

Using this collection

See Ansible Using collections for general detail on using collections.

Example inventory hosts file:

[routers]
router ansible_host=192.168.1.1

[routers:vars]
ansible_connection=ansible.netcommon.network_cli
ansible_network_os=community.routeros.routeros
ansible_user=admin
ansible_ssh_pass=test1234

Example playbook:

---
- name: RouterOS test
  hosts: routers
  gather_facts: false
  tasks:

  # Run a command and print its output
  - community.routeros.command:
      commands:
        - /system resource print
    register: system_resource_print
  - debug:
      var: system_resource_print.stdout_lines

  # Retrieve facts
  - community.routeros.facts:
  - debug:
      msg: "First IP address: {{ ansible_net_all_ipv4_addresses[0] }}"

Contributing to this collection

We're following the general Ansible contributor guidelines; see Ansible Community Guide.

If you want to clone this repositority (or a fork of it) to improve it, you can proceed as follows:

  1. Create a directory ansible_collections/community;
  2. In there, checkout this repository (or a fork) as routeros;
  3. Add the directory containing ansible_collections to your ANSIBLE_COLLECTIONS_PATH.

See Ansible's dev guide for more information.

Release notes

See the changelog.

Roadmap

We plan to regularly release minor and patch versions, whenever new features are added or bugs fixed. Our collection follows semantic versioning, so breaking changes will only happen in major releases.

More information

Licensing

GNU General Public License v3.0 or later.

See COPYING to see the full text.