]> git.phdru.name Git - ansible.git/commitdiff
Refactor(init-local-phd): Use module `mount`
authorOleg Broytman <phd@phdru.name>
Mon, 30 Mar 2020 00:01:52 +0000 (03:01 +0300)
committerOleg Broytman <phd@phdru.name>
Mon, 30 Mar 2020 00:12:48 +0000 (03:12 +0300)
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