Commit graph

7 commits

Author SHA1 Message Date
Sam Grimee - LX2SG
c1a6ae8658
Workaround prompt issues between ROS 6.49 and 7.1.5 (#62) (#161)
* Prompt support for ROS 6.49+ (#62)

* More precise version match (#62)

* Add changelog fragment and lint (#62)

* Update changelogs/fragments/161-workaround-prompt-with-space.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

* Vendor version package to support older ansible versions (#62)

* Update plugins/module_utils/routeros.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/module_utils/routeros.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* move PSF-2.0.txt to LICENSES folder

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-03-23 21:25:23 +01:00
Felix Fontein
7973f58661
Move licenses to LICENSES/, use SPDX-License-Identifier, mention all licenses in galaxy.yml, add missing license file (#101)
* Add SPDX license identifiers, mention all licenses in galaxy.yml.

* Add default copyright headers.

* Adjust remaining/missing entries.

* Fix/add more copyright statements.

* Add sanity test.

* Add changelog.

* Add missing license file.

* Remove colon after 'Copyright'.

* Avoid colon after 'Copyright' in lint script.
2022-07-18 23:16:54 +02:00
Felix Fontein
937aa0dbfa
Replace ansible.module_utils._text by ansible.module_utils.common.text.converters (#38)
* Replace ansible.module_utils._text by ansible.module_utils.common.text.converters.

* One more.
2021-06-27 09:53:45 +02:00
Renato Almeida de Oliveira
e5ad772703
Change to_text for to_native (#5) 2020-10-29 00:57:17 +03:00
Felix Fontein
6ccc2eab79 Add boilerplate (#108)
* Add boilerplate to doc_fragments and module_utils.

* Add boilerplate to unit tests.

* Add boilerplate to modules.
2020-10-26 15:18:40 +01:00
Renato Almeida de Oliveira
3634150468 routeros: Bug fix: Exception catching (#27)
* Bug fix: Exception catching

The function get_capabilities was failing to catch connections exceptions, what make an ugly output

OUTPUT BEFORE CHANGES:

The full traceback is:
Traceback (most recent call last):
  File "/root/.ansible/tmp/ansible-local-20843l7aphwz5/ansible-tmp-1588555470.4121525-264386939405924/AnsiballZ_routeros_comle>
    _ansiballz_main()
  File "/root/.ansible/tmp/ansible-local-20843l7aphwz5/ansible-tmp-1588555470.4121525-264386939405924/AnsiballZ_routeros_comallz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File "/root/.ansible/tmp/ansible-local-20843l7aphwz5/ansible-tmp-1588555470.4121525-264386939405924/AnsiballZ_routeros_com_module
    runpy.run_module(mod_name='ansible.modules.network.routeros.command', init_globals=None, run_name='__main__', a
  File "/usr/lib64/python2.7/runpy.py", line 176, in run_module
    fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 82, in _run_module_code
    mod_name, mod_fname, mod_loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/tmp/ansible_command_payload_XbsRY1/ansible_command_payload.zip/ansible/modules/network/routeros/r7, in <module>
  File "/tmp/ansible_command_payload_XbsRY1/ansible_command_payload.zip/ansible/modules/network/routeros/r7, in main
  File "/tmp/ansible_command_payload_XbsRY1/ansible_command_payload.zip/ansible/module_utils/network/routein run_commands
  File "/tmp/ansible_command_payload_XbsRY1/ansible_command_payload.zip/ansible/module_utils/network/routen get_connection
  File "/tmp/ansible_command_payload_XbsRY1/ansible_command_payload.zip/ansible/module_utils/network/routen get_capabilities
  File "/tmp/ansible_command_payload_XbsRY1/ansible_command_payload.zip/ansible/module_utils/connection.py
ansible.module_utils.connection.ConnectionError: Failed to authenticate: Authentication failed.
fatal: [MK]: FAILED! => changed=false
  module_stderr: |-
    Traceback (most recent call last):
      File "/root/.ansible/tmp/ansible-local-20843l7aphwz5/ansible-tmp-1588555470.4121525-264386939405924/AnsiballZ_routerosmodule>
        _ansiballz_main()
      File "/root/.ansible/tmp/ansible-local-20843l7aphwz5/ansible-tmp-1588555470.4121525-264386939405924/AnsiballZ_routerosnsiballz_main
        invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
      File "/root/.ansible/tmp/ansible-local-20843l7aphwz5/ansible-tmp-1588555470.4121525-264386939405924/AnsiballZ_routerosvoke_module
        runpy.run_module(mod_name='ansible.modules.network.routeros.command', init_globals=None, run_name='__main__
      File "/usr/lib64/python2.7/runpy.py", line 176, in run_module
        fname, loader, pkg_name)
      File "/usr/lib64/python2.7/runpy.py", line 82, in _run_module_code
        mod_name, mod_fname, mod_loader, pkg_name)
      File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
        exec code in run_globals
      File "/tmp/ansible_command_payload_XbsRY1/ansible_command_payload.zip/ansible/modules/network/routere 187, in <module>
      File "/tmp/ansible_command_payload_XbsRY1/ansible_command_payload.zip/ansible/modules/network/routere 157, in main
      File "/tmp/ansible_command_payload_XbsRY1/ansible_command_payload.zip/ansible/module_utils/network/r25, in run_commands
      File "/tmp/ansible_command_payload_XbsRY1/ansible_command_payload.zip/ansible/module_utils/network/r5, in get_connection
      File "/tmp/ansible_command_payload_XbsRY1/ansible_command_payload.zip/ansible/module_utils/network/r9, in get_capabilities
      File "/tmp/ansible_command_payload_XbsRY1/ansible_command_payload.zip/ansible/module_utils/connectio
    ansible.module_utils.connection.ConnectionError: Failed to authenticate: Authentication failed.
  module_stdout: ''
  msg: |-
    MODULE FAILURE
    See stdout/stderr for the exact error
  rc: 1

OUTPUT AFTER CHANGES

fatal: [MK]: FAILED! => changed=false
  msg: 'Failed to authenticate: Authentication failed.'

* Lint Fix

* changelog fragment

* changelog update

* to_text refactoring
2020-10-26 15:18:40 +01:00
John R Barker
bcfea39ddc Add networking (#1)
Initial commit of network content that was previously in community.general
2020-10-26 15:18:40 +01:00