Hi,
is it possible to run a task in a ‘normal’ ssh interaction mode? Sometimes I would have a playbook where, after having prepared a number of systems, there may be one command requiring some extra user input. This may be because this command is only sloppily programmed and for some reason may wait for stdin on some systems but not all of them (in which cases ansible will simply halt without any hint on why it might have stopped), or because the command is too powerful to mess around with expect
in a try-and-err fashion, or simply because some extra configuration file must be adapted through opening vim
.
Naturally, the concurrency for this task would have to be set to one, so I’m thinking about something like the following
tasks:
-
name: prepare system
action: command do-some-command -
name: fix configuration
action: command /usr/bin/vim /etc/config.conf
concurrency: interactive -
name: restart service
action: service name=some-service state=restarted
The second task would then run one after another and share full stdout and stdin with the terminal where the playbook is run, waiting for user input.
Is it possible that something like this may be added to ansible some day or – even better – is it already possible to accomplish this in some way? I could not find any information on this in the documentation, so sorry if ideas like this have already come up many times.
Cheers
/rike