Re: [ansible-project] Re: Switch to root user using dzdo

2020-02-10 Thread Vishal Bobade
I would assume that you could run with -vvv and it will show you the
stdout/stderr that indicates the failure in execution.

On Tue, 11 Feb, 2020, 12:55 PM Vishal Bobade, 
wrote:

> Hi,
>
> Seems related to the particular module you are trying to use here.
>
> Could you try performing this manually by ansible i.e. not by using
> playbook with debug mode enabled and see what error u see.
>
>
> On Tue, 11 Feb, 2020, 12:16 AM Poemy,  wrote:
>
>> As requested I commented out the *become_flags*, which gives me the
>> following task:
>>
>> - name: Install needed packages for Docker
>>   yum:
>> name: yum-utils,device-mapper-persistent-data,lvm2
>> state: latest
>>   become: yes
>>   become_method: dzdo
>>
>> And this gives as result the same error
>>
>> fatal: [10.7.201.114]: FAILED! => {"changed": false, "module_stderr": "",
>> "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the
>> exact error", "rc": 1}
>>
>> --
>> 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 ansible-project+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/f1b2b89c-11dc-4470-be3f-6c470136824f%40googlegroups.com
>> 
>> .
>>
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAJWgDiaUR6PTV8t0chsRJo52evZKB7mcUW7-nyDOsfPHNj-mwg%40mail.gmail.com.


Re: [ansible-project] Re: Switch to root user using dzdo

2020-02-10 Thread Vishal Bobade
Hi,

Seems related to the particular module you are trying to use here.

Could you try performing this manually by ansible i.e. not by using
playbook with debug mode enabled and see what error u see.


On Tue, 11 Feb, 2020, 12:16 AM Poemy,  wrote:

> As requested I commented out the *become_flags*, which gives me the
> following task:
>
> - name: Install needed packages for Docker
>   yum:
> name: yum-utils,device-mapper-persistent-data,lvm2
> state: latest
>   become: yes
>   become_method: dzdo
>
> And this gives as result the same error
>
> fatal: [10.7.201.114]: FAILED! => {"changed": false, "module_stderr": "",
> "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the
> exact error", "rc": 1}
>
> --
> 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 ansible-project+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/f1b2b89c-11dc-4470-be3f-6c470136824f%40googlegroups.com
> 
> .
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAJWgDiY9CMGBqLP7%3D6gyzTukB%2B8cWk-EuxhJOqZ6u4U8DbW-4A%40mail.gmail.com.


[ansible-project] Re: Switch to root user using dzdo

2020-02-10 Thread Poemy
As requested I commented out the *become_flags*, which gives me the 
following task:

- name: Install needed packages for Docker
  yum:
name: yum-utils,device-mapper-persistent-data,lvm2
state: latest
  become: yes
  become_method: dzdo

And this gives as result the same error

fatal: [10.7.201.114]: FAILED! => {"changed": false, "module_stderr": "", 
"module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the 
exact error", "rc": 1}

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/f1b2b89c-11dc-4470-be3f-6c470136824f%40googlegroups.com.


Re: [ansible-project] Re: Switch to root user using dzdo

2020-02-10 Thread Vishal Bobade
Hi,

Does it requires become_flags? Could you try commenting out that one.

On Mon, 10 Feb, 2020, 10:10 PM Poemy,  wrote:

> I followed your suggestions, thanks for that.
>
> I have now following task:
> - name: Install needed packages for Docker
>   yum:
> name: yum-utils,device-mapper-persistent-data,lvm2
> state: latest
>   become: yes
>   become_method: dzdo
>   become_flags: 'su -'
>
> When I run my playbook, it fails with following error message.
> fatal: [10.7.201.114]: FAILED! => {"changed": false, "module_stderr": "",
> "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the
> exact error", "rc": 1}
>
>
> --
> 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 ansible-project+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/0857d7f6-7aa9-4c17-8064-5c4b2ca2e858%40googlegroups.com
> 
> .
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAJWgDiaPsk5n3WqtF%2Bq0KEK3W1osYuEchtUK7-WRZRXcXye%2Bhg%40mail.gmail.com.


[ansible-project] Re: Switch to root user using dzdo

2020-02-10 Thread Poemy
I followed your suggestions, thanks for that.

I have now following task:
- name: Install needed packages for Docker
  yum:
name: yum-utils,device-mapper-persistent-data,lvm2
state: latest
  become: yes
  become_method: dzdo
  become_flags: 'su -'

When I run my playbook, it fails with following error message.
fatal: [10.7.201.114]: FAILED! => {"changed": false, "module_stderr": "", 
"module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the 
exact error", "rc": 1}


-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/0857d7f6-7aa9-4c17-8064-5c4b2ca2e858%40googlegroups.com.


Re: [ansible-project] Re: Switch to root user using dzdo

2020-02-07 Thread Work-Hard
oh yea? how's that? Please do explain!

On Friday, February 7, 2020 at 12:48:39 PM UTC-8, Dick Visser wrote:
>
> On Fri, 7 Feb 2020 at 21:17, Work-Hard > 
> wrote: 
> > 
> > as a workaround, you can change the file permission on linux to act as 
> root for your target area. 
>
> That sounds like throwing all security out of the window. 
> Please refrain from giving this kind of useless advice... 
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/12767763-0225-48d0-be22-27cee4eb6ff6%40googlegroups.com.


Re: [ansible-project] Re: Switch to root user using dzdo

2020-02-07 Thread Dick Visser
On Fri, 7 Feb 2020 at 21:17, Work-Hard  wrote:
>
> as a workaround, you can change the file permission on linux to act as root 
> for your target area.

That sounds like throwing all security out of the window.
Please refrain from giving this kind of useless advice...

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAL8fbwNjmKpHGkzzr7QkQP%3DkgNWbRcZS_%3DPnBGH0zrWiBjCJ1Q%40mail.gmail.com.


[ansible-project] Re: Switch to root user using dzdo

2020-02-07 Thread Work-Hard
as a workaround, you can change the file permission on linux to act as root 
for your target area.

On Friday, February 7, 2020 at 2:45:02 AM UTC-8, Poemy wrote:
>
> I have an ansible playblook running some tasks for my user, which I log in 
> through ssh.
>
> The user has root privileges by running following command in the terminal:
> dzdo su -
>
> It's actually the only way (no sudo, no root password) to get root access.
>
> Now, what I want to do is to switch my user to root at a certain point in 
> my ansible-playbook, using this *dzdo su -* behavior. 
>
> How to do this?
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/032c5586-2d91-4e57-8d15-9db8b4e83540%40googlegroups.com.