my loginuser is user1 and I want to run the playbook with root. How can i do this. if i use in cmdline, this does not work.
ansible-playbook main.yaml -i hosts --user=git -k --become-user=root --ask-become-pass --become-method=su
Please tell me how to implement this.
name: Install and Configure IEM hosts: rhel ansible_become: yes ansible_become_method: su ansible_become_user: root ansible_become_pass: passw0rd tasks: - name: Creating masthead file path file: path=/etc/opt/BESClient state=directory - name: Creating install directory
source share