summaryrefslogtreecommitdiffstats
path: root/roles/openshift_node/tasks/upgrade/config_changes.yml
diff options
context:
space:
mode:
authorDan Yocum <dyocum@redhat.com>2018-01-26 15:39:50 -0500
committerDan Yocum <dyocum@redhat.com>2018-01-26 15:39:50 -0500
commit7dceb6260a333e29c922dad8613ae6a0946fa07b (patch)
tree1c7c40a6c68e0668af2e2a5d0b865a4ef6af371d /roles/openshift_node/tasks/upgrade/config_changes.yml
parent501e7897b7becb1e5a5c7875b40675d1e7296ed7 (diff)
parent13e73c31a827d6fca810e120a7b3b6573b2eeb4b (diff)
downloadopenshift-7dceb6260a333e29c922dad8613ae6a0946fa07b.tar.gz
openshift-7dceb6260a333e29c922dad8613ae6a0946fa07b.tar.bz2
openshift-7dceb6260a333e29c922dad8613ae6a0946fa07b.tar.xz
openshift-7dceb6260a333e29c922dad8613ae6a0946fa07b.zip
Merge branch 'master' of github.com:openshift/openshift-ansible into rm_origin-components
Diffstat (limited to 'roles/openshift_node/tasks/upgrade/config_changes.yml')
-rw-r--r--roles/openshift_node/tasks/upgrade/config_changes.yml28
1 files changed, 6 insertions, 22 deletions
diff --git a/roles/openshift_node/tasks/upgrade/config_changes.yml b/roles/openshift_node/tasks/upgrade/config_changes.yml
index dd9183382..15ac76f7d 100644
--- a/roles/openshift_node/tasks/upgrade/config_changes.yml
+++ b/roles/openshift_node/tasks/upgrade/config_changes.yml
@@ -27,28 +27,12 @@
path: "/var/lib/cni/networks/openshift-sdn/"
state: absent
-# Disable Swap Block (pre)
-- block:
- - name: Remove swap entries from /etc/fstab
- replace:
- dest: /etc/fstab
- regexp: '(^[^#].*swap.*)'
- replace: '# \1'
- backup: yes
-
- - name: Add notice about disabling swap
- lineinfile:
- dest: /etc/fstab
- line: '# OpenShift-Ansible Installer disabled swap per overcommit guidelines'
- state: present
-
- - name: Disable swap
- command: swapoff --all
-
- when:
- - openshift_node_upgrade_swap_result | default(False) | bool
- - openshift_disable_swap | default(true) | bool
-# End Disable Swap Block
+# https://docs.openshift.com/container-platform/3.4/admin_guide/overcommit.html#disabling-swap-memory
+# swapoff is a custom module in lib_utils that comments out swap entries in
+# /etc/fstab and runs swapoff -a, if necessary.
+- name: Disable swap
+ swapoff: {}
+ when: openshift_disable_swap | default(true) | bool
- name: Apply 3.6 dns config changes
yedit: