no tty

99 views
Skip to first unread message

Guy Matz

unread,
Sep 18, 2014, 4:38:35 PM9/18/14
to ansible...@googlegroups.com
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

Guy Matz

unread,
Sep 19, 2014, 3:14:53 PM9/19/14
to ansible...@googlegroups.com
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

Michael DeHaan

unread,
Sep 21, 2014, 3:33:55 PM9/21/14
to ansible...@googlegroups.com
What problems are you having?



--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CABnTgtWyrVYwWO3%2ByAwevxcz-U4mn3q0YrvS23FYmWZZ17Cm8g%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

Guy Matz

unread,
Sep 22, 2014, 9:32:32 AM9/22/14
to ansible...@googlegroups.com
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!

Matt Martz

unread,
Sep 22, 2014, 10:27:39 AM9/22/14
to ansible...@googlegroups.com
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?


For more options, visit https://groups.google.com/d/optout.



--
Matt Martz
@sivel
sivel.net

Michael DeHaan

unread,
Sep 22, 2014, 1:25:01 PM9/22/14
to ansible...@googlegroups.com
Sometimes scripts will also behave better if given a --batch flag or redirected < /dev/null for input.



Reply all
Reply to author
Forward
0 new messages