fix: rely on logical ansible_user instead of this whoami hack

This commit is contained in:
Clément Désiles
2025-11-14 00:09:51 +01:00
parent 26dc670949
commit 8b40b4d676
6 changed files with 51 additions and 52 deletions
+1 -11
View File
@@ -26,21 +26,11 @@
# line: "%wheel ALL=(ALL) NOPASSWD: ALL"
# validate: /usr/sbin/visudo -cf %s
# - command:
# cmd: whoami
# no_log: true
# become: false
# register: main_user
# - set_fact:
# main_user: "{{ main_user.stdout }}"
# no_log: true
# - name: Create paru sources dir
# file:
# path: "{{ paru_src_path }}"
# state: directory
# owner: "{{ main_user }}"
# owner: "{{ ansible_user }}"
# - name: Clone git sources
# become: false
+1 -11
View File
@@ -22,21 +22,11 @@
line: "%wheel ALL=(ALL) NOPASSWD: ALL"
validate: /usr/sbin/visudo -cf %s
- ansible.builtin.command:
cmd: whoami
no_log: true
become: false
register: main_user
- ansible.builtin.set_fact:
main_user: "{{ main_user.stdout }}"
no_log: true
- name: Create yay sources dir
ansible.builtin.file:
path: "{{ yay_src_path }}"
state: directory
owner: "{{ main_user }}"
owner: "{{ ansible_user }}"
- name: Clone git sources
become: false