ansible-collections / community.routeros

Ansible modules for managing MikroTik RouterOS instances.
https://galaxy.ansible.com/ui/repo/published/community/routeros/
GNU General Public License v3.0
103 stars 46 forks source link

Support new paths for RouterOS 6.x.x #182

Open izzzhoga opened 1 year ago

izzzhoga commented 1 year ago
SUMMARY

Hello! When using RouterOS 6.x.x, I used paths to configure my Mikrotik (/routing ospf network), but with the advent of my Mikrotik with RouterOS 7.x.x, I have to "split" the code, since a different path to similar settings is used.

Are there plans to support old paths (for RouterOS 6.x.x) in modules such as community.routeros.api_modify?

Now for RouterOS 6.x.x I use the community.routeros.command module, and for RouterOS 7.x.x I use the community.routeros.api_modify module, which is very inconvenient for me.

ISSUE TYPE
COMPONENT NAME

community.routeros.api_modify

ADDITIONAL INFORMATION

For example:

- name: Configure ospf network for RouterOS 6.x.x
  community.routeros.api_modify:
    path: routing ospf network
    data:
      - some_data: "{{ some_variable }}"
felixfontein commented 1 year ago

Generally the modules support both ROS 6 and ROS 7 paths. If you want support for a specific ROS 6 (or 7) path, creating a PR is the easiest way to get it added.

izzzhoga commented 1 year ago

Good afternoon! There was a need to configure the following paths in the configuration: /routing filter (for ROS 6) /ip route vrf (for ROS7) /routing ospf network (for ROS6)

Please add these paths to the modules community.routeros.api_modify and community.routeros.api_info