forked from jakub/ansible
Refactor portainer.yml and miniplay: remove hardcoded passwords for security, update comments for clarity, and enhance task descriptions.
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
---
|
||||
- name: Sanity check SSH + sudo on portainer
|
||||
- name: Sanity: pure SSH and then sudo
|
||||
hosts: nextcloud_host
|
||||
gather_facts: false
|
||||
|
||||
tasks:
|
||||
- name: Who am I as SSH user?
|
||||
- name: Who am I as SSH user? (no sudo)
|
||||
become: false
|
||||
ansible.builtin.command: whoami
|
||||
changed_when: false
|
||||
register: who
|
||||
@@ -12,7 +13,7 @@
|
||||
- ansible.builtin.debug:
|
||||
msg: "SSH user is: {{ who.stdout }}"
|
||||
|
||||
- name: Who am I with sudo?
|
||||
- name: Who am I with sudo? (explicit become)
|
||||
become: true
|
||||
become_method: sudo
|
||||
ansible.builtin.command: whoami
|
||||
|
||||
Reference in New Issue
Block a user