]> git.phdru.name Git - ansible.git/blobdiff - playbooks/debian/init-local-phd.yml
Refactor(init-local-phd): Use module `mount`
[ansible.git] / playbooks / debian / init-local-phd.yml
index 597959fb7bb77c616de03c3b48b568d12b4b4f67..f3f79a203b370184203e14479078737fb6eaf2ad 100644 (file)
         ]
         state: latest
         update_cache: yes
-    - name: Extend fstab (add cgroups)
-      become: true
-      lineinfile:
-        path: /etc/fstab
-        regexp: "^none              /sys/fs/cgroup cgroup   memory         0        0$"
-        line: "none              /sys/fs/cgroup cgroup   memory         0        0"
-    - name: Extend fstab (add webdav.yandex.ru)
-      become: true
-      lineinfile:
-        path: /etc/fstab
-        regexp: "^https://webdav.yandex.ru /mnt     davfs   noauto,user    0        0$"
-        line: "https://webdav.yandex.ru /mnt     davfs   noauto,user    0        0"
+    - name: Mount cgroups
+      mount:
+        path: /sys/fs/cgroup
+        src: none
+        opts: memory
+        state: mounted
+        fstype: cgroup
+    - name: Mount webdav.yandex.ru
+      mount:
+        path: /mnt
+        src: https://webdav.yandex.ru
+        opts: noauto,user
+        state: present
+        fstype: davfs