I found a solution.
This ansible module will check for login prompt regardless of the "login_prompt" option presence.
I had to provide empty options to make it work, here is the playbook:
---
- hosts: localhost
connection: local
gather_facts: false
vars:
telnet_link: "x.x.x.200"
telnet_port: "5001"
tasks:
- name: Configure Static IP via Telnet
ansible.netcommon.telnet:
host: "{{ telnet_link }}"
port: "{{ telnet_port }}"
crlf: true
send_newline: true
login_prompt: ""
user: ""
password_prompt: ""
password: ""
prompts:
- '[alpine:~#]'
command:
- echo "ok"
Happy New Year !