ansible Become (Privilege Escalation)

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Introduction

Often you need to execute commands under a different user or get root privileges. Those options allow you to become another user in the guest system.

Syntax

  • become: can be set to true or yes and triggers the user escalation settings.
  • become_user: set to the desired user in the remote host.
  • become_method: specify the command used to make login and change user.
  • become_flags: change login parameters. Mostly used when you want to change to a system user without shell privileges.


Got any ansible Question?