make fstab handling for openwrt safe
authorChristian Pointner <equinox@realraum.at>
Mon, 21 May 2018 00:59:22 +0000 (02:59 +0200)
committerChristian Pointner <equinox@realraum.at>
Mon, 21 May 2018 00:59:22 +0000 (02:59 +0200)
ansible/roles/openwrt-image/tasks/prepare.yml

index 3214f7c..5fb6f6d 100644 (file)
   mount:
     fstab: "{{ openwrt_imgbuilder_files }}/etc/fstab"
     state: present
-  args:
-    "{{ item }}"
+    src: "{{ item.src | default(omit) }}"
+    path: "{{ item.path | default(omit) }}"
+    fstype: "{{ item.fstype | default(omit) }}"
+    opts: "{{ item.opts | default(omit) }}"
+    boot: "{{ item.boot | default(omit) }}"
+    dump: "{{ item.dump | default(omit) }}"
+    passno: "{{ item.passno | default(omit) }}"
   when: openwrt_mounts is defined
   with_items: "{{ openwrt_mounts }}"
   loop_control:
     label: "{{ item.path }}"
 
+
 - name: Create UCI configuration files
   template:
     src: uci.j2
@@ -85,7 +91,7 @@
 - name: Decompress the OpenWrt image builder
   command: >-
     tar -xf  "{{ openwrt_download_dir }}/{{ openwrt_tarball_name }}"
-    -C   "{{ openwrt_imgbuilder_dir     }}"
+    -C   "{{ openwrt_imgbuilder_dir }}"
 
 - name: Symlink the cache repository
   file: