From 493489f8e5e61ed2e827d0290299ed4bded956fb Mon Sep 17 00:00:00 2001 From: nicoo Date: Mon, 21 May 2018 02:01:13 +0200 Subject: [PATCH] roles/openwrt-image: Cache downloaded files --- ansible/roles/openwrt-image/tasks/prepare.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ansible/roles/openwrt-image/tasks/prepare.yml b/ansible/roles/openwrt-image/tasks/prepare.yml index 7ed93d0..b0847ec 100644 --- a/ansible/roles/openwrt-image/tasks/prepare.yml +++ b/ansible/roles/openwrt-image/tasks/prepare.yml @@ -13,6 +13,7 @@ state: directory mode: '0755' with_items: + - "{{ openwrt_download_dir }}/dl" - "{{ openwrt_imgbuilder_files }}/etc/config" - "{{ openwrt_mixin | map('dirname') | map('regex_replace', '^', openwrt_imgbuilder_files) | unique | list }}" @@ -85,3 +86,9 @@ command: >- tar -xf "{{ openwrt_download_dir }}/{{ openwrt_tarball_name }}" -C "{{ openwrt_imgbuilder_dir }}" + +- name: Symlink the cache repository + file: + state: link + src: "{{ playbook_dir }}/{{ openwrt_download_dir }}/dl" + path: "{{ openwrt_imgbuilder_dir }}/{{ openwrt_tarball_basename }}/dl" -- 1.7.10.4