Fix download url

This commit is contained in:
Tobias Reisinger 2024-04-30 12:43:56 +02:00
parent f615c00fdb
commit 5a1d171ff8
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
4 changed files with 11 additions and 6 deletions

View file

@ -1,6 +1,6 @@
namespace: serguzim
name: sbc
version: 1.0.0
version: 1.0.1
readme: README.md
authors:
- Tobias Reisinger <tobias@msrg.cc>

View file

@ -1,6 +1,6 @@
- name: Burn img to device
ansible.builtin.command:
cmd: dd if="{{ dietpi.img}}.img" of="{{ dietpi_device }}" bs=4M status=progress
cmd: dd if="{{ (lookup('ansible.builtin.env', 'XDG_RUNTIME_DIR'), dietpi.img + '.img') | path_join }}" of="{{ dietpi_device }}" bs=4M status=progress
chdir: "{{ build_dir.path }}"
become: true
register: cmd_result

View file

@ -1,9 +1,8 @@
- name: Download iso
ansible.builtin.get_url:
url: "{{ dietpi_download_base }}/{{ dietpi.img }}.7z"
dest: "{{ (lookup('ansible.builtin.env', 'XDG_RUNTIME_DIR'), dietpi.img + '.xz') | path_join }}"
url: "{{ dietpi_download_base }}/{{ dietpi.img }}.img.xz"
dest: "{{ (lookup('ansible.builtin.env', 'XDG_RUNTIME_DIR'), dietpi.img + '.img.xz') | path_join }}"
- name: Extract iso
ansible.builtin.command:
#cmd: 7z x -y -o"{{ build_dir.path }}" "{{ (lookup('ansible.builtin.env', 'XDG_RUNTIME_DIR'), dietpi.img + '.7z') | path_join }}"
cmd: xz -d "{{ (lookup('ansible.builtin.env', 'XDG_RUNTIME_DIR'), dietpi.img + '.xz') | path_join }}"
cmd: xz -kfd "{{ (lookup('ansible.builtin.env', 'XDG_RUNTIME_DIR'), dietpi.img + '.img.xz') | path_join }}"

View file

@ -31,6 +31,12 @@
dest: "{{ (config_path, 'dietpi-wifi.txt') | path_join }}"
when: dietpi.auto_setup.net_wifi_enabled | default(False)
become: true
- name: Enable spi in boot.txt
ansible.builtin.replace:
path: "{{ (config_path, 'boot.txt') | path_join }}"
regexp: '^#dtparam=spi=off$'
replace: 'dtparam=spi=on'
- name: Try to copy Automation_Custom_Script.sh
ansible.builtin.copy: