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 - bash
- wget - wget
sysctl: sysctl:
- net.inet.ip.forwarding - item: net.inet.ip.forwarding
- net.inet6.ip6.forwarding value: 1
- item: net.inet6.ip6.forwarding
value: 1
tags: tags:
- always - always

View file

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

View file

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