Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f0efcff07f | |||
| 7280e186dd | |||
| f8d3ba4327 | |||
| 251d8795ea | |||
| 33cfff35b7 | |||
| 5e5aac70fa | |||
| ed79033f44 | |||
| c87fa90e62 | |||
| 9377f60b7d | |||
| 8c2e8d5e08 | |||
| b56434f44e | |||
| ddef5769ee | |||
| 6dd30696b4 | |||
| f89cb7e93b | |||
| 28b7cb428b | |||
| e6057713f9 | |||
| 855c2c0a2d | |||
| af5ab1f3bd | |||
| 5672ff56d2 | |||
| 817c79b149 | |||
| 2d035374fb | |||
| 4940f479a1 | |||
| 81e5b3cb32 |
@ -1 +1 @@
|
|||||||
http://xplayer-ota.pureroad.cn/files_20251108_083626.tar.xz
|
http://xplayer-ota.pureroad.cn/files_20251203_232832.tar.xz
|
||||||
|
|||||||
@ -63,6 +63,7 @@
|
|||||||
libfdk-aac2 \
|
libfdk-aac2 \
|
||||||
libldacbt-abr2 \
|
libldacbt-abr2 \
|
||||||
libldacbt-enc2 \
|
libldacbt-enc2 \
|
||||||
|
aria2 \
|
||||||
cloud-guest-utils"
|
cloud-guest-utils"
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
@ -79,14 +80,43 @@
|
|||||||
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: |
|
||||||
if command -v apt-fast &> /dev/null; then
|
if command -v apt-fast &> /dev/null; then
|
||||||
apt-fast update -y
|
apt-fast update -y || apt-get update -y
|
||||||
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
|
||||||
|
|
||||||
@ -94,10 +124,11 @@
|
|||||||
shell:
|
shell:
|
||||||
cmd: |
|
cmd: |
|
||||||
if command -v apt-fast &> /dev/null; then
|
if command -v apt-fast &> /dev/null; then
|
||||||
apt-fast install -y {{ packages }}
|
apt-fast install -y {{ packages }} || apt-get install -y {{ packages }}
|
||||||
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
|
||||||
|
|
||||||
@ -268,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:
|
||||||
@ -334,7 +366,6 @@
|
|||||||
- enable_xplayer_server
|
- enable_xplayer_server
|
||||||
- start_xplayer_server
|
- start_xplayer_server
|
||||||
- restart_xplayer_server
|
- restart_xplayer_server
|
||||||
- reboot_required
|
|
||||||
register: copy_result
|
register: copy_result
|
||||||
changed_when: copy_result.changed or (force_update | default(false) | bool)
|
changed_when: copy_result.changed or (force_update | default(false) | bool)
|
||||||
|
|
||||||
@ -468,7 +499,7 @@
|
|||||||
|
|
||||||
- name: reboot_required
|
- name: reboot_required
|
||||||
shell:
|
shell:
|
||||||
cmd: echo "need reboot"
|
cmd: sync && reboot
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user