Skip to content

arista.eos.eos_config unable to handle interactive prompts #565

@diego-lopez8

Description

@diego-lopez8
SUMMARY

Configuration options which have a interactive prompt, such as port breakouts, require y confirmation via a prompt. While this is implemented in arista.eos.eos_command, this is not implemented in arista.eos.eos_config, thus this module is unable to deploy any configurations that include this. There doesn't seem to be a workaround either.

ISSUE TYPE
  • Feature Request
COMPONENT NAME

arista.eos.eos_config

ANSIBLE VERSION
ansible [core 2.17.5]
  config file = None
  configured module search path = ['/home/vincent/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/vincent/miniconda3/envs/net/lib/python3.11/site-packages/ansible
  ansible collection location = /home/vincent/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/vincent/miniconda3/envs/net/bin/ansible
  python version = 3.11.10 (main, Oct  3 2024, 07:29:13) [GCC 11.2.0] (/home/vincent/miniconda3/envs/net/bin/python)
  jinja version = 3.1.4
  libyaml = True
COLLECTION VERSION
arista.eos                               9.0.0  
CONFIGURATION
CONFIG_FILE() = None
OS / ENVIRONMENT

Arista DCS-7280CR3-32D4-F
Software image version: 4.31.2F

STEPS TO REPRODUCE
    - name: Deploy Arista EOS configurations
      arista.eos.eos_config:
        backup: true
        src: "configs/{{ inventory_hostname }}.conf"
        replace: config
        save_when: always
      register: arista_result

With a config source file with the following:

...
interface Ethernet3/1
   description TEST BREAKOUT
   mtu 9100
   no shutdown
   speed 100g-2
!
...

In the debug output, I see

    HSRN-SW8A-2MT(config-s-ansible_17-if-Et3/1)#speed 100g-2\r\n! The requested speed change will cause the following \r\ninterfaces to become inactive:\r\n\r\n   Ethernet4/1\r\n\r\nDo you wish to proceed with this command? [y/N]

Which does not get answered and there is no parameter to specify the answer in.

EXPECTED RESULTS

I expect to have a prompt, similar to the arista.eos.eos_command module, where the prompts can be answered if I am deploying the configurations as a whole file.

ACTUAL RESULTS

It appears that once prompted, ansible adds the next line which automatically declines the prompt.

fatal: [hsrn-sw8a-2mt]: FAILED! => {
    "changed": false,
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureThis issue/PR relates to a feature request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions