use ansible sysctl module for config ip forwarding

This commit is contained in:
Mark Lee 2017-02-09 17:28:44 +09:00
parent 3b1a196c75
commit 34a71554ae

View file

@ -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