Categories

Category cover

Automation
155 posts

Category cover

Learning paths
119 posts

Category cover

CISO
22 posts

Category cover

Security
20 posts

Category cover

Notes
19 posts

Category cover

Personal Security
18 posts

Category cover

Infrastructure
12 posts

Category cover

OT/ICS
5 posts

Category cover

Books
3 posts

Category cover

UNetLab
3 posts

Category cover

Write-up
3 posts

Category cover

OSInt
2 posts

Category cover

My life
1 posts

Managing CLI prompts with Ansible

Andrea Dainese
March 01, 2025
Post cover

Some commands, before becoming operational, ask for confirmation from the operator. Ansible has a basic capability to handle these situation

Some commands, before becoming operational, ask for confirmation from the operator. Ansible has a basic capability to handle these situations thanks to the cli_command and ios_command modules. The first one is generic, the second one is specific to Cisco IOS systems, but both essentially perform the same function with some peculiarities and limitations. In general, vendor-specific modules should handle syntax errors correctly, but as we will see later, this is not always true.

Let’s see some examples based on the “Simple Network Lab” laboratory.

Resetting Interface Counters

The first example we see concerns resetting interface counters. The command requires a simple confirmation:

Continue reading the post on Patreon .