hi Visser,

please find the below playbook and let me know any changes to be made

---
- name: Weblogic Server control
hosts: "server IP"
become: yes
become_user: sudo user
become_method: sudo
tasks: 
- name: demo
command: /usr/ucb/whoami
register: cmdoutput
- debug: msg="{{ cmdoutput.stdout }}"


On Saturday, October 20, 2018 at 11:37:17 PM UTC+5:30, Dick Visser wrote:
>
> Hi
> In order to help we need the actual playbook or task that generates this 
> (erroneous) output. So please provide that.
>
> Also, your mentioning of ‘basic command whoami using become command’ 
> indicates that you might be using a wrong approach.
> So also tell us what you’re actually trying to achieve on the target 
> system.
>
> Dick
>
> On Sat, 20 Oct 2018 at 09:47, Bairava Surya <[email protected] 
> <javascript:>> wrote:
>
>> hi all,
>>
>>
>> i want to run basic command on solaris OS i.e whoami using become 
>> command.so am able to sudo to different user using putty successfully but 
>> facing issues via ansible.
>>
>> OS:solaris
>> Sudo user:mygroup
>> sudo implementation:.usr/local/bin/sudo su - mygroup
>> Authentication:QAS(VAS)
>>
>> Error:
>> fatal: [mahcine]: FAILED! => {"changed": false, "module_stderr": "Shared 
>> connection to machineclosed.\r\n", "module_stdout": "/bin/sh: sudo:
>> not found\r\n", "msg": "MODULE FAILURE", "rc": 1}
>>
>>
>> can anyone guide me what changes i need to make inorder to get output as 
>> *mygroup*
>>
>> -- 
>> 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] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/9f15238e-91ac-4106-985a-beddc098979a%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/ansible-project/9f15238e-91ac-4106-985a-beddc098979a%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> -- 
> Sent from a mobile device - please excuse the brevity, spelling and 
> punctuation.
>

-- 
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/25452904-5c64-4887-93d7-6a2b73e4b935%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to