Open daanvdsanden opened 3 years ago
This is not an issue when using
ansible_connection: ansible.netcommon.httpapi
Hi @daanvdsanden Thank you for submitting this issue. Can I suggest you try eos_command module with prompt handling, instead of eos_config ? You can get more information on how to use eos_command for this purpose from this description.
@GomathiselviS even when using the eos_command
module I seem to trigger the timeout
error message.
I used the exact example from the docs:
- name: run a command that requires a confirmation. Note that prompt
takes regexes, and so strings containing characters like brackets
need to be escaped.
arista.eos.eos_command:
commands:
- command: reload power
prompt: \[confirm\]
answer: y
newline: false
Error:
The full traceback is:
File "/home/kdam0/.../arista/eos/plugins/module_utils/network/eos/eos.py", line 140, in run_commands
response = connection.run_commands(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kdam0/.venv/ansible211/lib64/python3.11/site-packages/ansible/module_utils/connection.py", line 200, in __rpc__
raise ConnectionError(to_text(msg, errors='surrogate_then_replace'), code=code)
fatal: [sw1]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"commands": [
{
"answer": "y",
"check_all": false,
"command": "reload power",
"newline": false,
"output": "text",
"prompt": "\\[confirm\\]",
"sendonly": false,
"version": "1"
}
],
"interval": 1,
"match": "all",
"retries": 10,
"wait_for": null
}
},
"msg": "command timeout triggered, timeout value is 30 secs.\nSee the timeout setting options in the Network Debug and Troubleshooting Guide."
}
would someone be able to provide some ideas for why this might be happenning? I've even tried with setting the prompt to .*
to match everything in case it was my regex.
Thanks in advance!
SUMMARY
When deploying a config via ssh that enables shutdown interfaces by default the task will TimeOut.
ISSUE TYPE
COMPONENT NAME
arista.eos.eos_config
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Devices running on EOS 4.23.4M and 4.25.4M experience the problem (probably more version are impacted)
STEPS TO REPRODUCE
When you run a task to replace the configuration which contains the following lines (while not in the running config yet) the task will time out:
I'm using the following task:
I'm using the ssh connection (not eapi).
EXPECTED RESULTS
I'm expecting the configuration to be installed and activated.
ACTUAL RESULTS
The task is not executed because it times out.
This is probably triggered becouse EOS is asking for extra input that is not in the configuration file see a short screen capture: