Sudo with password on ansible

how can i use sudo with password on ansible playbook file ? i know I should add user with NOPASSWD in sudoers to run ansible , but I can’t enable sudo with NOPASSWD , how can I handle password on YAMIL file ?

Hi @Hamed-Enayatzare

You can use become to switch from a user to another user

https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_privilege_escalation.html