Reputation:
I can become root on host only with command "sudo -i". I must be root to make some changes on this host. How can I become root with this method using ansibleplaybook?
Upvotes: 0
Views: 876
Reputation: 4475
For privilege escalation, become allows you to specify both become_method and become_flags:
become_method
become_flags
- name: My playbook hosts: myhosts become: yes become_method: sudo become_flags: '-i' tasks: - name: My task [..]
Upvotes: 1