update, fix the accept var from being changed for other functions like update-firmware.

This commit is contained in:
me
2026-09-08 09:29:45 -07:00
parent 433e354638
commit 197bbc2b03
+4 -9
View File
@@ -101,11 +101,6 @@
ansible_distribution_file: "{{ prov_dir }}/ansible_distribution.txt" ansible_distribution_file: "{{ prov_dir }}/ansible_distribution.txt"
ansible_pkg_mgr_file: "{{ prov_dir }}/ansible_pkg_mgr.txt" ansible_pkg_mgr_file: "{{ prov_dir }}/ansible_pkg_mgr.txt"
- name: General | Facts | Package | Update Command | Helpers | pacman
set_fact:
update_accept_var: '--noconfirm'
when: ansible_pkg_mgr == "pacman"
- name: General | Facts | Package | Update Command | Store Variables - name: General | Facts | Package | Update Command | Store Variables
shell: "{{ item }}" shell: "{{ item }}"
loop: loop:
@@ -159,18 +154,18 @@
pacman) pacman)
echo "*** Pacman ***" echo "*** Pacman ***"
auto_accept="" pacman_accept=""
if [[ -n "$accept" ]]; then if [[ -n "$accept" ]]; then
auto_accept="{{ update_accept_var }}" pacman_accept="--noconfirm"
fi fi
sudo pacman -Syu $auto_accept || sudo pacman -Syu $pacman_accept ||
return 1 return 1
echo -e "\n" echo -e "\n"
if [[ "$LOGNAME" != "root" ]]; then if [[ "$LOGNAME" != "root" ]]; then
echo "*** AUR (yay) ***" echo "*** AUR (yay) ***"
yay -Syu $auto_accept || return 2 yay -Syu $pacman_accept || return 2
else else
echo "*** User is root, skipping AUR (yay) ***" echo "*** User is root, skipping AUR (yay) ***"
fi fi