-
Notifications
You must be signed in to change notification settings - Fork 46
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
can't change value of nat using api_find_and_modify #169
Comments
Note that you are passing the string "yes" to |
are you mean on find should use boolean? strange bcs when create nat details with string 'yes' and mikrotik as i know support yes,no for like disabled so how i know to use boolean or yes,no ? |
MikroTik converts |
still the same, try string and boolean show |
How does your task look like? Also, is there a reason you are not using a YAML dictionary for ...
find:
src-address: "{{ montip }}"
protocol: "{{ montproto }}"
dst-address-list: "{{ item.1 }}"
dst-port: "{{ item.0 }}"
chain: "{{ natchain }}"
action: "{{ nataction }}"
out-interface-list: "{{ interfacelist }}"
disabled: "{{ natstatus }}" ? |
i tried this before as u see (this copy/past from executed .yml file) find:
dst-port: "{{ item.0 }}"
chain: "{{ natchain }}"
src-address: "{{ montip }}"
protocol: "{{ montproto }}"
dst-address-list: "{{ item.1 }}"
action: "{{ nataction }}"
out-interface-list: "{{ interfacelist }}"
disabled: "{{ natstatus }}" |
Hello, i try the same values in mikrotik directly but no success look like there is limitation or requirement when using it
more check |
Got the same problem. I think I've found the root of the problem, but I can't figure any workaround. I believe it is integer vs string.
does not work
this one works
|
SUMMARY
when try to use
api_find_and_modify
can't get what i want by find based on input then change the value and i get the result ok (success) when removerequire_matches_min: 1
but there is no change ofvalues:
so try to change it to get what i want but no luckSure
ISSUE TYPE
not sure if it's bug or need more info
COMPONENT NAME
ANSIBLE VERSION
Thanks
The text was updated successfully, but these errors were encountered: