fixed renaming of gnocci host_vars directories
[noc.git] / ansible / roles / openwrt-image / tasks / prepare.yml
index 5fb6f6d..b6b67c5 100644 (file)
@@ -13,7 +13,7 @@
     state: directory
     mode: '0755'
   with_items:
-    - "{{ openwrt_download_dir }}/dl"
+    - "{{ openwrt_download_dir }}/dl/{{ openwrt_arch }}"
     - "{{ openwrt_imgbuilder_files }}/etc/config"
     - "{{ openwrt_mixin | map('dirname') | map('regex_replace', '^', openwrt_imgbuilder_files) | unique | list }}"
 
     trim_blocks: yes
   when: openwrt_groups is defined or openwrt_users is defined
 
-### TODO: this just hangs?
-# - unarchive:
-#     copy: False
-#     src:  "{{ openwrt_download_dir }}/{{ openwrt_tarball_name }}"
-#     dest: "{{ openwrt_imgbuilder_dir }}"
-
-- name: Decompress the OpenWrt image builder
-  command: >-
-    tar -xf  "{{ openwrt_download_dir }}/{{ openwrt_tarball_name }}"
-    -C   "{{ openwrt_imgbuilder_dir }}"
+- unarchive:
+    copy: False
+    src:  "{{ openwrt_download_dir }}/{{ openwrt_tarball_name }}"
+    dest: "{{ openwrt_imgbuilder_dir }}"
 
 - name: Symlink the cache repository
   file:
     state: link
-    src: "{{ openwrt_download_dir }}/dl"
+    src: "{{ openwrt_download_dir }}/dl/{{ openwrt_arch }}"
     path: "{{ openwrt_imgbuilder_dir }}/{{ openwrt_tarball_basename }}/dl"