user vs sudo vs sudo_user in ansible playbooks
user is the user you’re ssh’ing as. With your config, you’re ssh’ing as deploy. sudo_user is the user you’re sudo’ing on the host when sudo: yes is set. So I think in your case none of sudo and sudo_user are necessary if you can ssh as deploy. However, if you ssh as root, you need … Read more