2 - name: Create download directory
4 dest: "{{ openwrt_download_dir }}"
8 - name: Generate OpenWrt download URLs
11 https://downloads.openwrt.org/releases/{{ openwrt_release }}/targets/{{ openwrt_arch | mandatory }}/{{ openwrt_target }}
13 - name: Download sha256sums
15 url: "{{ openwrt_url }}/sha256sums"
16 dest: "{{ openwrt_download_dir }}/{{ openwrt_tarball_basename }}.sha256"
18 - name: Download sha256sums.asc
20 url: "{{ openwrt_url }}/sha256sums.asc"
21 dest: "{{ openwrt_download_dir }}/{{ openwrt_tarball_basename }}.sha256.asc"
23 - name: Check OpenPGP signature
25 gpg2 --no-options --no-default-keyring --secret-keyring /dev/null
26 --verify --keyring "{{ role_path }}/openwrt-keyring.gpg"
28 "{{ openwrt_download_dir }}/{{ openwrt_tarball_basename }}.sha256.asc"
31 - name: Extract SHA256 hash of the imagebuilder archive
32 command: grep '{{ openwrt_tarball_name }}' "{{ openwrt_download_dir }}/{{ openwrt_tarball_basename }}.sha256"
36 - name: Download imagebuilder
38 url: "{{ openwrt_url }}/{{ openwrt_tarball_name }}"
39 dest: "{{ openwrt_download_dir }}/{{ openwrt_tarball_name }}"
40 checksum: sha256:{{ sha256.stdout.split(' ') | first }}
43 - name: Delete downloaded artifacts
48 - "{{ openwrt_download_dir }}/{{ openwrt_tarball_basename }}.sha256"
49 - "{{ openwrt_download_dir }}/{{ openwrt_tarball_basename }}.sha256.asc"
50 - "{{ openwrt_download_dir }}/{{ openwrt_tarball_name }}"