Browse Source

premanently disable swap

resolves issue-252

Signed-off-by: John lockman <john.lockman@friday.local>
John lockman 4 years ago
parent
commit
8e947e5ef5
1 changed files with 6 additions and 0 deletions
  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