Skip to content
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

Error 'identity' must be '.id' module community.routeros.api #67

Closed
registr76 opened this issue Feb 7, 2022 · 1 comment · Fixed by #68
Closed

Error 'identity' must be '.id' module community.routeros.api #67

registr76 opened this issue Feb 7, 2022 · 1 comment · Fixed by #68

Comments

@registr76
Copy link

SUMMARY

Hello.

I am trying to get neighbor data through community.routeros.api.
When I add the "identity" field to the list, I get an error "'identity' must be '.id'". Is it supposed to be like this or is it a bug?

ISSUE TYPE
  • Bug Report
COMPONENT NAME

community.routeros.api

ANSIBLE VERSION
ansible [core 2.12.2]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.9/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.9.7 (default, Nov 24 2021, 21:15:59) [GCC 10.3.1 20211027]
  jinja version = 3.0.3
  libyaml = False
COLLECTION VERSION
# /usr/lib/python3.9/site-packages/ansible_collections
Collection         Version
------------------ -------
community.routeros 2.0.0 
CONFIGURATION
DEFAULT_ASK_PASS(/etc/ansible/ansible.cfg) = False
DEFAULT_GATHERING(/etc/ansible/ansible.cfg) = smart
DEFAULT_HOST_LIST(/etc/ansible/ansible.cfg) = ['/root/ansible/hosts.yaml']
HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = False
OS / ENVIRONMENT
routerboard: yes
board-name: SXT 2
model: RBSXTG-2HnD
revision: r3
serial-number: E2230F5EDF77
firmware-type: ar9344L
factory-firmware: 6.47.10
current-firmware: 6.47.10
upgrade-firmware: 6.46.
STEPS TO REPRODUCE
    - name: Get "ip neighbor query" {{ inventory_hostname }}
      community.routeros.api:
        hostname: "{{ ansible_host }}"
        port: "{{ api_port }}"
        password: "{{ ansible_password }}"
        username: "{{ ansible_user }}"
        path: "ip neighbor"
        query: ".id address mac-address identity"
      register: neighbor_list
EXPECTED RESULTS

I need to get the IP addresses and names of devices connected to the AP via WDS. To do this, I request data from the list of /ip neighbors: ip address, mac-address, record .id and identity. Further I process by mac-address.

ACTUAL RESULTS

As a result I get an error.

fatal: [tmp5-1]: FAILED! => {"changed": false, "msg": ["'identity' must be '.id'"]}
@NikolayDachev
Copy link
Collaborator

We will fix it !
Thank you for reporting this issue !

NikolayDachev added a commit to NikolayDachev/community.routeros that referenced this issue Feb 8, 2022
@NikolayDachev NikolayDachev mentioned this issue Feb 8, 2022
felixfontein added a commit that referenced this issue Feb 10, 2022
* fix issues #67

* fix query id check

* add changelog fragment

* fix changelog fragment new line

* fix changelog fragment new line2

* Update changelogs/fragments/68-fix-query-id-check.yml

Co-authored-by: Felix Fontein <[email protected]>

Co-authored-by: Felix Fontein <[email protected]>
patchback bot pushed a commit that referenced this issue Feb 10, 2022
* fix issues #67

* fix query id check

* add changelog fragment

* fix changelog fragment new line

* fix changelog fragment new line2

* Update changelogs/fragments/68-fix-query-id-check.yml

Co-authored-by: Felix Fontein <[email protected]>

Co-authored-by: Felix Fontein <[email protected]>
(cherry picked from commit a46c7df)
felixfontein pushed a commit that referenced this issue Feb 10, 2022
* fix issues #67

* fix query id check

* add changelog fragment

* fix changelog fragment new line

* fix changelog fragment new line2

* Update changelogs/fragments/68-fix-query-id-check.yml

Co-authored-by: Felix Fontein <[email protected]>

Co-authored-by: Felix Fontein <[email protected]>
(cherry picked from commit a46c7df)

Co-authored-by: Nikolay Dachev <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants