apenella / go-ansible

Go-ansible is a Go package that enables the execution of ansible-playbook or ansible commands directly from Golang applications. It supports a wide range of options for each command, enabling smooth integration of Ansible functionality into your projects.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

feature: support interactive input from stdin

rfc2119 opened this issue · comments

I have a playbook file which requires user input in order to progress. Currently, when invoking an interactive playbook from go-ansible default values for user input are taken.

How do you think this might be supported ? I was thinking of piping the stdin of go-ansible to ansible's stdin

Hi! @rfc2119
Time ago I tried to write an example doing something similar to your propose but I never finished it :(
I take your idea and I am going to think how to fit it in go-ansible.

btw, I could remember that I used the library https://github.com/Netflix/go-expect.

@rfc2119 thank you very much for #48

feature available on v1.1.0