From e14b84a478b61248ed30307dfa74b8ddf99528d3 Mon Sep 17 00:00:00 2001 From: Jacob Cody Wimer Date: Sun, 7 Apr 2019 22:15:04 -0400 Subject: [PATCH] Remove swap --- roles/common/tasks/main.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index 7a95333..5a12558 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -141,5 +141,14 @@ replace: '\1{{ inventory_hostname }}\2' backup: yes -- name: swap - include: swap.yml +- name: Turn off swap + shell: swapoff -a + +- name: swap - remove current swaps from fstab + lineinfile: + dest: /etc/fstab + regexp: '^\/[\S]+\s+none\s+swap ' + state: absent + +#- name: swap +# include: swap.yml