rewrite the sysctl task

This commit is contained in:
Jack Ivanov 2017-04-04 17:02:11 +02:00
parent c0f4b5fa41
commit 6e61a51aca
3 changed files with 12 additions and 7 deletions

View file

@ -10,8 +10,10 @@
- bash
- wget
sysctl:
- net.inet.ip.forwarding
- net.inet6.ip6.forwarding
- item: net.inet.ip.forwarding
value: 1
- item: net.inet6.ip6.forwarding
value: 1
tags:
- always

View file

@ -18,8 +18,8 @@
tags:
- always
- name: Enable packet forwarding for IPv4
sysctl: name="{{ item }}" value=1
- name: Sysctl tuning
sysctl: name="{{ item.item }}" value="{{ item.value }}"
with_items:
- "{{ sysctl|default([]) }}"
tags:

View file

@ -83,8 +83,11 @@
- cgroup-tools
- openssl
sysctl:
- net.ipv4.ip_forward
- net.ipv4.conf.all.forwarding
- net.ipv6.conf.all.forwarding
- item: net.ipv4.ip_forward
value: 1
- item: net.ipv4.conf.all.forwarding
value: 1
- item: net.ipv6.conf.all.forwarding
value: 1
tags:
- always