瀏覽代碼

premanently disable swap

resolves issue-252

Signed-off-by: John lockman <john.lockman@friday.local>
John lockman 4 年之前
父節點
當前提交
8e947e5ef5
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      roles/common/tasks/main.yml

+ 6 - 0
roles/common/tasks/main.yml

@@ -50,6 +50,12 @@
   changed_when: true
   tags: install
 
+- name: Permanently Disable SWAP in fstab 
+  replace:
+    path: /etc/fstab
+    regexp: '^([^#].*?\sswap\s+sw\s+.*)$'
+    replace: '# \1'
+
 - name: Disable selinux
   selinux:
     state: disabled