From b8be9070a37ee9ed9461d6c24929dcf24b03304e Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Mon, 21 May 2018 02:59:22 +0200 Subject: [PATCH] make fstab handling for openwrt safe --- ansible/roles/openwrt-image/tasks/prepare.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ansible/roles/openwrt-image/tasks/prepare.yml b/ansible/roles/openwrt-image/tasks/prepare.yml index 3214f7c..5fb6f6d 100644 --- a/ansible/roles/openwrt-image/tasks/prepare.yml +++ b/ansible/roles/openwrt-image/tasks/prepare.yml @@ -42,13 +42,19 @@ 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: -- 1.7.10.4