deletegate-to without become

16 views
Skip to first unread message

Ramu

unread,
Aug 28, 2018, 5:55:47 PM8/28/18
to ansible...@googlegroups.com
Hi Experts,
  I have a playbook like

---
hosts: test_group
ansible_ssh_user: remoteuser
become: true
 become_method: sudo
tasks:
  - debug:
      msg: "Hello world"
    delegate_to: localhost

However, I don't want to use become root as my current user is not in sudoer

Is there a way to suppress become attribute while delegating the task?

Thanks in advance,
regards,
Ramu 

Kai Stian Olstad

unread,
Aug 28, 2018, 6:16:13 PM8/28/18
to ansible...@googlegroups.com
Just use become false.

- debug:
msg: "Hello world"
delegate_to: localhost
become: false


--
Kai Stian Olstad


Ramu

unread,
Aug 28, 2018, 7:05:55 PM8/28/18
to ansible...@googlegroups.com
Thanks Kai

--
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-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/3790744.5z4AnEX1f5%40x1.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages