Hi,
I want to run a program on a remote server where after login, the program will ask for more input using the same prompt.
This is the basic flow:
Read Username
Read Password
Read commands ← these get echoed back
until ‘h’ or ‘H’ is entered
This is a sample run of the program
BASE:/home# python3 converse2.py
Welcome to BASE
My configuration is up to date
Print settings are normal
Username: sq
Password: SoLong>
w abc
w abc
h
I run the same program using Ansible Expect with this playbook:
It now partly works because you made the items of a single dict key into a list and by doing so also quoted the value with ‘#’ in it.
But what I meant is to have the responses itself be a list, so you can have duplicates. I think this would look like: