-
Notifications
You must be signed in to change notification settings - Fork 45
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
Confusion regarding supported keys #104
Comments
Thanks for creating this issue. This is exactly what I was hoping for when I wrote
in the documentation :-) Unfortunately RouterOS is not very helpful to figure out all the available keys for all paths, that's why it's likely that some keys are missing for some paths - like this one. https://github.com/ansible-collections/community.routeros/blob/main/plugins/module_utils/_api_data.py#L765-L773 does not have |
Thank you for the reply, Felix. I read the note and I totally respect that. Again, very thankful for your work. The note is the reason I tried to humbly ask. I was also not able to find definition files you just pointed out (_api_data.py) to clarify my confusion. Can I be anyhow helpful with fixing that? I guess adding a key to the python file and testing it is something I could manage... There is also one other failure I experienced. Sorry for not filing it as another issue. I also tried to add The task: - name: "Test"
community.routeros.api_modify:
hostname: "{{ ansible_host }}"
password: "{{ ansible_ssh_pass }}"
username: "{{ ansible_user }}"
path: ip dhcp-server lease
data:
- address: 10.0.0.1
mac-address: 00:00:00:00:00:03
server: all
- address: 10.0.0.2
mac-address: 00:00:00:00:00:08
server: all Response:
|
#106 adds support for the missing options in |
The second error you are reporting seems to be that there is at least one DHCP lease on your router that does not have a |
@felixfontein, this is interesting. You are actually correct. There was an entry with
After deleting these entries it works. Setting server to "all" in playbook or in mikrotik breaks it. Gladly, this is not really common use case. |
#107 fixes the problem with |
2.2.1 is now out with fixes for these. I'm closing this. If there are other problems, please create a new issue, and if there are problems with the two problems mentioned in here, please comment here (then I'll reopen). Thanks :) |
Hello everyone,
thank you for your time spent with creating this great piece of sotware. Recently I decided to use ansible to manage all mikrotik configrations. The main goal is to have infrastructure as code and be able to apply any changes to mikrotik devices using ansible.
I have tried very basic examples, unfortunately these do not seem to work for me.
I took basic example "Setup DHCP server networks", added key "domain", which from my point of view should work, and it produces following error.
Not sure whether this is a bug but I think this should be working. Am I wrong, please?
SUMMARY
ISSUE TYPE
COMPONENT NAME
community.routeros.api_modify
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Targeting Mikrotik ROS 7.3.1 (stable)
STEPS TO REPRODUCE
Simply running the given playbook produces the error.
EXPECTED RESULTS
Command to be succesful, creating a DHCP server network with domain assigned.
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: