Hello! Anyone know if there is a way to specify no tty for a play? I saw on the list that someone had gotten around it by using screen, but I was wondering if there was a better way.
Thanks!
Guy
Hello! Anyone know if there is a way to specify no tty for a play? I saw on the list that someone had gotten around it by using screen, but I was wondering if there was a better way.
Thanks!
Guy
Hello! Anyone know if there is a way to specify ‘no tty’ for a play? I have a command that calls a script that is prompting for overwrites if it thinks there’s a tty attached . … I saw on the list that someone had gotten around it by using screen, but I was wondering if there was a better way.
Thanks!
Guy
What problems are you having?
I am trying to run a script using the command module . . . when the script thinks it has a tty it prompts, asking if it should overwrite files. When the script thinks there is no tty it just overwrites files, which is the behavior what I want.
Thanks!
I would assume that if you specified -T in ANSIBLE_SSH_ARGS (env var) or in ssh_args in ansible.cfg (http://docs.ansible.com/intro_configuration.html#ssh-args) that it would disable the tty.
Unfortunately this is global, and I am unsure how all of the modules would work with this configuration.
Can you modify the script to take an argument that will also force the same behavior as not having a tty? Or perhaps an environment var?
Sometimes scripts will also behave better if given a --batch flag or redirected < /dev/null for input.