|
Colton Myers |
at Jan 5, 2015 at 11:31 pm
|
⇧ |
| |
I've heard good things about piping the `yes` command into your command:
sudo salt '*' cmd.run "/usr/bin/yes | rm -i /tmp/zzz"
--
Colton Myers
Platform Engineer, SaltStack
@basepi on Github/Twitter/IRC
On Dec 10, 2014, at 8:22 PM, ram@fractalio.com wrote:I just used the rm -i as an example.. I was looking for a general solution for other commands that dont have a quiet option.
On Wednesday, December 10, 2014 8:50:37 PM UTC+5:30, Stephen Spencer wrote:
This isn't exactly an answer to your question, but you could use the -f flag to rm.
-S
On Dec 9, 2014 9:53 AM, "Raghuram BK" <r...@fractalio.com <javascript:>> wrote:
sudo salt '*' cmd.run "rm -i /tmp/zzz" stdin='y\n'
works from the command line
but when I try this from a python script :
rc = client.cmd('*', 'cmd.run', [cmd_to_run], stdin="y\n")
It does not work
Is it possible to run such an interative remote command from a python script?
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com <javascript:>.
For more options, visit
https://groups.google.com/d/optout <
https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+
unsubscribe@googlegroups.com For more options, visit
https://groups.google.com/d/optout <
https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe@googlegroups.com.
For more options, visit
https://groups.google.com/d/optout.