Compare commits

..

16 Commits

2 changed files with 32 additions and 1 deletions

View File

@ -1 +1 @@
http://xplayer-ota.pureroad.cn/files_20251110_194232.tar.xz http://xplayer-ota.pureroad.cn/files_20251203_232832.tar.xz

View File

@ -80,6 +80,34 @@
mode: '0644' mode: '0644'
tags: apt tags: apt
- name: check missing packages
shell:
cmd: |
MISSING=""
for pkg in {{ packages }}; do
# 先检查原包名
if dpkg-query -W -f='${Status}' "$pkg" 2>/dev/null | grep -q "install ok installed"; then
continue
# 如果原包名不存在,尝试检查带 t64 后缀的版本
elif dpkg-query -W -f='${Status}' "${pkg}t64" 2>/dev/null | grep -q "install ok installed"; then
continue
else
MISSING="yes"
break
fi
done
if [ -n "$MISSING" ]; then
echo "missing"
else
echo "all_installed"
fi
args:
executable: /bin/bash
register: package_check
changed_when: false
ignore_errors: yes
tags: apt
- name: update apt cache - name: update apt cache
shell: shell:
cmd: | cmd: |
@ -88,6 +116,7 @@
else else
apt-get update -y apt-get update -y
fi fi
when: package_check.stdout == "missing"
ignore_errors: yes ignore_errors: yes
tags: apt tags: apt
@ -99,6 +128,7 @@
else else
apt-get install -y {{ packages }} apt-get install -y {{ packages }}
fi fi
when: package_check.stdout == "missing"
ignore_errors: yes ignore_errors: yes
tags: apt tags: apt
@ -269,6 +299,7 @@
mode: '0755' mode: '0755'
- src: ../files/99-usb-auto-mount.rules - src: ../files/99-usb-auto-mount.rules
dest: /etc/udev/rules.d/99-usb-auto-mount.rules dest: /etc/udev/rules.d/99-usb-auto-mount.rules
mode: '0644' mode: '0644'
tags: usb tags: usb
notify: notify: