$ ./guess_the_languageDevOps
DevOps · easy · #267

What does become: true do for this Ansible task?

- name: restart sshd
  service: name=sshd state=restarted
  become: true
  1. Turns the task into a handler
  2. Runs the task on the control node
  3. Runs it with escalated privileges
  4. Retries the task until it succeeds
become enables privilege escalation, by default sudo to root, which is needed to manage system services.
Play DevOps ▸