Asked by: Margarette Ameixoeira
asked in category: General Last Updated: 10th March, 2020

What is become in Ansible playbook?

Ansible Sudo or become is a method to run a particular task in a playbook with Special Privileges like root user or some other user.

Click to see full answer.


Moreover, what is a playbook in Ansible?

An Ansible playbook is an organized unit of scripts that defines work for a server configuration managed by the automation tool Ansible. Ansible is a configuration management tool that automates the configuration of multiple servers by the use of Ansible playbooks.

Also, how do I use Ansible playbook? Run Your First Command and Playbook. Put the concepts you learned to work with this quick tutorial. Install Ansible, execute a network configuration command manually, execute the same command with Ansible, then create a playbook so you can execute the command any time on multiple network devices.

Also Know, what does become mean in Ansible?

Become. Ansible allows you to 'become' another user, different from the user that logged into the machine (remote user). Before 1.9 Ansible mostly allowed the use of sudo and a limited use of su to allow a login/remote user to become a different user and execute tasks, create resources with the 2nd user's permissions.

How do I become Ansible root?

Going over the command:

  1. -i ./hosts - Set the inventory file, the one named hosts.
  2. -b - "become", tell Ansible to become another user to run the command.
  3. --become-user=root - Run the following commands as user "root" (e.g. use "sudo" with the command)

34 Related Question Answers Found

What are playbooks?

Is Ansible written in Python?

How do you make a playbook?


What is Ansible in DevOps?

What is a playbook in business?

How do I run Ansible locally?


What is Ansible Yaml?

What is Ansible code?

Does Ansible require root?


What is Ansible galaxy?

What is gather facts in Ansible?

What is Ansible vault?


What is become true in Ansible?

What user does Ansible run as?