3
0
forked from jakub/ansible
Files
ansible_fencl/nextcloud/collections/miniplay

23 lines
547 B
Plaintext

---
- name: Sanity check SSH + sudo on portainer
hosts: nextcloud_host
gather_facts: false
tasks:
- name: Who am I as SSH user?
ansible.builtin.command: whoami
changed_when: false
register: who
- ansible.builtin.debug:
msg: "SSH user is: {{ who.stdout }}"
- name: Who am I with sudo?
become: true
become_method: sudo
ansible.builtin.command: whoami
changed_when: false
register: who_root
- ansible.builtin.debug:
msg: "Become user is: {{ who_root.stdout }}"