ansible-playbooks/test-playbook.yml

14 lines
256 B
YAML

---
- name: Test become
hosts: all
become: true
tasks:
- name: Run whoami
ansible.builtin.command: whoami
register: result
when: true # keep the linter happy
- name: Print result
ansible.builtin.debug:
var: result.stdout