summaryrefslogtreecommitdiff
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to 'roles')
-rw-r--r--roles/openwrt/image/defaults/main.yml2
-rw-r--r--roles/openwrt/image/tasks/main.yml6
2 files changed, 8 insertions, 0 deletions
diff --git a/roles/openwrt/image/defaults/main.yml b/roles/openwrt/image/defaults/main.yml
index e32d817f..a0d888ec 100644
--- a/roles/openwrt/image/defaults/main.yml
+++ b/roles/openwrt/image/defaults/main.yml
@@ -15,3 +15,5 @@ openwrt_output_image_suffixes:
openwrt_packages_remove: []
openwrt_packages_add: []
openwrt_packages_extra: []
+
+openwrt_keep_temporary_build_dir: false
diff --git a/roles/openwrt/image/tasks/main.yml b/roles/openwrt/image/tasks/main.yml
index 82a1c50d..c029f4c7 100644
--- a/roles/openwrt/image/tasks/main.yml
+++ b/roles/openwrt/image/tasks/main.yml
@@ -53,6 +53,12 @@
dest: "{{ openwrt_output_dir }}/build-stderr.log"
- name: Delete the temporary build directory
+ when: not openwrt_keep_temporary_build_dir
file:
path: "{{ openwrt_imgbuilder_dir }}"
state: absent
+
+ - name: print temporary build directory information
+ when: openwrt_keep_temporary_build_dir
+ debug:
+ msg: "The temporary build directory has not been deleted, the path to the directory is: {{ openwrt_imgbuilder_dir }}"