From 224e6acb3ab4a8b0507349d7498d57e713fda197 Mon Sep 17 00:00:00 2001 From: Mark Lee Date: Thu, 9 Feb 2017 17:28:44 +0900 Subject: [PATCH] use ansible sysctl module for config ip forwarding --- roles/kubernetes/preinstall/tasks/main.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/roles/kubernetes/preinstall/tasks/main.yml b/roles/kubernetes/preinstall/tasks/main.yml index e7955ac76..4737801d9 100644 --- a/roles/kubernetes/preinstall/tasks/main.yml +++ b/roles/kubernetes/preinstall/tasks/main.yml @@ -140,14 +140,10 @@ tags: bootstrap-os - name: Enable ip forwarding - lineinfile: - dest: /etc/sysctl.d/99-sysctl.conf - regexp: '^net.ipv4.ip_forward=' - line: 'net.ipv4.ip_forward=1' + sysctl: + name: net.ipv4.ip_forward + value: 1 state: present - create: yes - backup: yes - validate: 'sysctl -f %s' tags: bootstrap-os - name: Write openstack cloud-config