Sometimes scripts will also behave better if given a --batch flag or
redirected < /dev/null for input.



On Mon, Sep 22, 2014 at 10:26 AM, Matt Martz <[email protected]> wrote:

> 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?
>
> On Mon, Sep 22, 2014 at 8:32 AM, Guy Matz <[email protected]> wrote:
>
>> 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!
>>
>> On Sun, Sep 21, 2014 at 3:33 PM, Michael DeHaan <[email protected]>
>> wrote:
>>
>>> What problems are you having?
>>>
>>>
>>>
>>> On Fri, Sep 19, 2014 at 3:14 PM, Guy Matz <[email protected]> wrote:
>>>
>>>> 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
>>>>
>>>>  --
>>>> 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 [email protected].
>>>> To post to this group, send email to [email protected].
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/ansible-project/CABnTgtWyrVYwWO3%2ByAwevxcz-U4mn3q0YrvS23FYmWZZ17Cm8g%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/ansible-project/CABnTgtWyrVYwWO3%2ByAwevxcz-U4mn3q0YrvS23FYmWZZ17Cm8g%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>  --
>>> 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 [email protected].
>>> To post to this group, send email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgwNzpKvGgMWyA3f6Zg9fH_BC7DHRdopwbQpzn%3DsKraCYw%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgwNzpKvGgMWyA3f6Zg9fH_BC7DHRdopwbQpzn%3DsKraCYw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
>> 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 [email protected].
>> To post to this group, send email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/CABnTgtXQ1X7obZ2_SSnw6vb2xJ0y3%3DDT2A%3DNT1%3D1_7erEgjM2A%40mail.gmail.com
>> <https://groups.google.com/d/msgid/ansible-project/CABnTgtXQ1X7obZ2_SSnw6vb2xJ0y3%3DDT2A%3DNT1%3D1_7erEgjM2A%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Matt Martz
> @sivel
> sivel.net
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAD8N0v9ZOtv8pHpcA-B3TzQGpWQkM1m1o1GYbh6ng5BasAXkKw%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CAD8N0v9ZOtv8pHpcA-B3TzQGpWQkM1m1o1GYbh6ng5BasAXkKw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgwUKLgX54YU3ingMw_4d84pJAJ-XYgKfmCY3ECZ_YqViw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to