Create swapfile only on nodepool nodes

TrivialFix

Change-Id: I73d208d2a52c018ad6027f811c6b3a2eee802015
This commit is contained in:
Christian Berendt 2016-09-29 22:27:31 +02:00
parent 5380724930
commit 9748226688
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@ set -o xtrace
set -o errexit
function setup_disk {
if [ ! -f /swapfile ]; then
if [[ -f /etc/nodepool/provider && ! -f /swapfile ]]; then
sudo swapoff -a
sudo dd if=/dev/zero of=/swapfile bs=1M count=4096
sudo chmod 0600 /swapfile

View File

@ -4,7 +4,7 @@ set -o xtrace
set -o errexit
function setup_disk {
if [ ! -f /swapfile ]; then
if [[ -f /etc/nodepool/provider && ! -f /swapfile ]]; then
sudo swapoff -a
sudo dd if=/dev/zero of=/swapfile bs=1M count=4096
sudo chmod 0600 /swapfile