update, fix the accept var from being changed for other functions like update-firmware.
This commit is contained in:
@@ -101,11 +101,6 @@
|
||||
ansible_distribution_file: "{{ prov_dir }}/ansible_distribution.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
|
||||
shell: "{{ item }}"
|
||||
loop:
|
||||
@@ -159,18 +154,18 @@
|
||||
|
||||
pacman)
|
||||
echo "*** Pacman ***"
|
||||
auto_accept=""
|
||||
pacman_accept=""
|
||||
if [[ -n "$accept" ]]; then
|
||||
auto_accept="{{ update_accept_var }}"
|
||||
pacman_accept="--noconfirm"
|
||||
fi
|
||||
|
||||
sudo pacman -Syu $auto_accept ||
|
||||
sudo pacman -Syu $pacman_accept ||
|
||||
return 1
|
||||
echo -e "\n"
|
||||
|
||||
if [[ "$LOGNAME" != "root" ]]; then
|
||||
echo "*** AUR (yay) ***"
|
||||
yay -Syu $auto_accept || return 2
|
||||
yay -Syu $pacman_accept || return 2
|
||||
else
|
||||
echo "*** User is root, skipping AUR (yay) ***"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user