As per my understanding if we are able to run command sudo su - root in target server then can use become_method as sudo... but need to run custom command mcs cmh to login as root user in target server. I don't think so we can use become_metod = sudo in this scenario.
On Tue, Nov 23, 2021 at 7:02 PM steve missoh <[email protected]> wrote: > You need to configure sudo on the target server. > and then use > become_method = sudo > become = yes > in your ansible.cfg > > Le mardi 23 novembre 2021 à 14:06:58 UTC+1, [email protected] a > écrit : > >> Hello All, >> >> In target server need to run a command like "mcs cmh" which prompts for >> password to become root user... how can I achieve the same in become >> method? >> Thanks, >> BHR. >> > -- > 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 view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/b0c02cf9-196c-4b34-92fe-b638248f9fb8n%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/b0c02cf9-196c-4b34-92fe-b638248f9fb8n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- *ద్వేషించేందుకు జీవిత కాలం సరిపోదు కాబట్టి క్షమించడం అలవర్చుకోండి.* -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CANQ7jkhyn8%3Duyy779%2BnOyTFaa0pXLT9kfYACmQFxFqmmzspKZw%40mail.gmail.com.
