Ansible and Arista

Hallo to all,

at first I have to commit that I’m a totally beginner - regarding Ansible.
And due to this I have a question:
I have a setup with an Ansible-controller and a ssh-connection to a Arista-Switch.
The Arista switch you can configure with specail eos-commands, i.e. arista.eos.eos_logging - but also with global commands:

here the official example:

  • name: configure top level settings

arista.eos.eos_config:

lines: hostname {{ inventory_hostname }}

If I try exactly this command above it works.

But if I change the command like this:

  • name: configure top level settings

arista.eos.eos_config:

lines: logging trap informational

→ it doesn’t work.
I don’t get an error message but I don’t see the command in my configuration-file.

Has anyone an idea what is going wrong?

Best regards and thanks for the help.

Stefan

Hi Stefan

I haven’t used this module but when I check in document it says it should be the exact command you use in target device . Are you using the correct one .

The ordered set of commands that should be configured in the section. The commands must be the exact same commands as found in the device running-config. Be sure to note the configuration command syntax as some commands are automatically modified by the device config parser.

aliases: commands

//v