ansible-collections.communi.../tests/ee/roles/smoke/tasks/main.yml
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

39 lines
1 KiB
YAML

---
# Copyright (c) Ansible Project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
- name: Run api module
community.routeros.api:
username: foo
password: bar
hostname: localhost
path: ip address
ignore_errors: true
register: result
- name: Validate result
assert:
that:
- result is failed
- "'Error while connecting: [Errno 111] Connection refused' == result.msg"
- name: Run command module
community.routeros.command:
commands:
- /ip address print
vars:
ansible_host: localhost
ansible_connection: ansible.netcommon.network_cli
ansible_network_os: community.routeros.routeros
ansible_user: foo
ansible_ssh_pass: bar
ansible_ssh_port: 12349
ignore_errors: true
register: result
- name: Validate result
assert:
that:
- result is failed
- "'Unable to connect to port 12349 ' in result.msg or 'ssh connect failed: Connection refused' in result.msg"