summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuan Luis de Sousa-Valadas Castaño <jdesousa@redhat.com>2017-09-08 12:17:05 +0200
committerJuan Luis de Sousa-Valadas Castaño <jdesousa@redhat.com>2017-09-08 12:20:34 +0200
commitba22ab302392586bc26b8ffec89b095114e68923 (patch)
tree019723a027c66d03c5d6c2a23ffb5c9fb11f173a
parent58960f7599c564c8e72ae8afb8d5a3804a4d7737 (diff)
downloadopenshift-ba22ab302392586bc26b8ffec89b095114e68923.tar.gz
openshift-ba22ab302392586bc26b8ffec89b095114e68923.tar.bz2
openshift-ba22ab302392586bc26b8ffec89b095114e68923.tar.xz
openshift-ba22ab302392586bc26b8ffec89b095114e68923.zip
Move sysctl.conf customizations to a separate file
Move them from /etc/sysctl.conf to /etc/sysctl.d/99-openshift.conf
-rw-r--r--roles/openshift_node/handlers/main.yml3
-rw-r--r--roles/openshift_node/tasks/main.yml13
2 files changed, 5 insertions, 11 deletions
diff --git a/roles/openshift_node/handlers/main.yml b/roles/openshift_node/handlers/main.yml
index a6bd12d4e..5e566847e 100644
--- a/roles/openshift_node/handlers/main.yml
+++ b/roles/openshift_node/handlers/main.yml
@@ -17,8 +17,5 @@
state: restarted
when: (not skip_node_svc_handlers | default(False) | bool) and not (node_service_status_changed | default(false) | bool)
-- name: reload sysctl.conf
- command: /sbin/sysctl -p
-
- name: reload systemd units
command: systemctl daemon-reload
diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml
index 573051504..4df25f09d 100644
--- a/roles/openshift_node/tasks/main.yml
+++ b/roles/openshift_node/tasks/main.yml
@@ -104,14 +104,11 @@
# The atomic-openshift-node service will set this parameter on
# startup, but if the network service is restarted this setting is
# lost. Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1372388
-#
-# Use lineinfile w/ a handler for this task until
-# https://github.com/ansible/ansible/pull/24277 is included in an
-# ansible release and we can use the sysctl module.
-- name: Persist net.ipv4.ip_forward sysctl entry
- lineinfile: dest=/etc/sysctl.conf regexp='^net.ipv4.ip_forward' line='net.ipv4.ip_forward=1'
- notify:
- - reload sysctl.conf
+- sysctl:
+ name: net.ipv4.ip_forward
+ value: 1
+ sysctl_file: "/etc/sysctl.d/99-openshift.conf"
+ reload: yes
- name: Start and enable openvswitch service
systemd: