roles/openwrt-image: Support configuring mountpoints
authornicoo <nicoo@realraum.at>
Wed, 16 May 2018 19:33:13 +0000 (21:33 +0200)
committernicoo <nicoo@realraum.at>
Wed, 16 May 2018 19:37:23 +0000 (21:37 +0200)
ansible/roles/openwrt-image/tasks/prepare.yml
ansible/tuer.yml

index b697e39..4fcf8c1 100644 (file)
   loop_control:
     label: "{{ item.key }}"
 
+- name: Generate /etc/fstab
+  mount:
+    fstab: "{{ openwrt_imgbuilder_files }}/etc/fstab"
+    state: present
+  args:
+    "{{ item }}"
+  when: openwrt_mounts is defined
+  with_items: "{{ openwrt_mounts }}"
+  loop_control:
+    label: "{{ item.path }}"
+
 - name: Create UCI configuration files
   template:
     src: uci.j2
index 29af04f..1a1e52e 100644 (file)
                 PasswordAuth: off
                 RootPasswordAuth: off
                 Port: 22000
+
+        openwrt_mounts:
+          - path: /run
+            src: none
+            fstype: tmpfs
+            opts: nosuid,nodev,noexec,noatime