lets say I have a playbook:
---
- name
host: testserver
become_method = sudo
become_user = root
tasks:
- name: copystuff
module: copy
do stuff
- name: copy stuff
delegate_to: localhost
module: copy
do stuff
I have same user with the same password on both localhost and the testserver. But on testserver, I have to use sudo to beocme a root but on localhost I have to use dzdo to become a root.
So I was wondering if there is a way for me use either one, if one method does not work?