Replacing the name of the command is not presently possible -- Sudo flags (those sent to sudo) are controllable, however.
On Thu, Jan 8, 2015 at 7:14 PM, Ian Whitney <[email protected]> wrote: > Can not. This a battle that has come up before. > > Although it's a very different tool, I know that Capistrano I can override > how it calls certain shell commands. Is such a thing possible in Ansible? > If so, I could just turn all use of "su" into "sudo su" > > On Thursday, January 8, 2015 at 5:46:44 PM UTC-6, Michael DeHaan wrote: >> >> There aren't any options for sudo + su together. >> >> Are you sure you can't just <sudo user> and skip the su'ing? >> >> >> >> >> >> On Thu, Jan 8, 2015 at 4:14 PM, Ian Whitney <[email protected]> wrote: >> >>> Hi, >>> >>> I've been learning Ansible and have run into a behavior that causes >>> problems with the server setup here at work. I'm wondering if there's a way >>> to fix it. >>> >>> On our server I have to run certain commands as an admin user. But I >>> can't just switch users with 'su superuser'. I have to execute su with >>> sudo. So, 'sudo su superuser'. >>> >>> If I do: >>> >>> ansible all -a "whoami" -R superuser >>> >>> Then the command hangs, as the server is asking for a password, which I >>> do not have. >>> >>> And if I do: >>> >>> ansible all -a "whoami" -s -R superuser >>> >>> I get the error message about trying to combine sudo and su. >>> >>> Do I have options? >>> >>> Thanks, >>> >>> >>> Ian >>> >>> >>> -- >>> 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/c35ae424-1d2d-4e4c-a6aa- >>> b5f64ac12bce%40googlegroups.com >>> <https://groups.google.com/d/msgid/ansible-project/c35ae424-1d2d-4e4c-a6aa-b5f64ac12bce%40googlegroups.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/ea5867b7-9094-4ef5-aff5-059e44a22c87%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/ea5867b7-9094-4ef5-aff5-059e44a22c87%40googlegroups.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%2BnsWgy6oC6xsTsGLLr6mUu8TDiHPB8Zg7q6dbYajy4BinFmNQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
