Switch to with items for sysctl

This will give more info to the user about the specific values being
set and allows us to grow this list easier.

TrivialFix

Change-Id: Iaf22bf2c9f4ab294bec0cca17699d461852109ac
This commit is contained in:
SamYaple 2016-03-15 13:54:41 +00:00
parent 22fe11840b
commit 976c9c93c7
2 changed files with 11 additions and 23 deletions

View File

@ -1,15 +1,10 @@
---
- name: Allowing IP forwarding on network node
sysctl: name="net.ipv4.ip_forward" value=1 sysctl_set=yes
when:
- set_sysctl | bool
- inventory_hostname in groups['neutron-l3-agent']
- name: Disabling reverse path filter on network node
sysctl: name="net.ipv4.conf.{{ item }}.rp_filter" value=0 sysctl_set=yes
- name: Setting sysctl values
sysctl: name={{ item.name }} value={{ item.value }} sysctl_set=yes
with_items:
- "all"
- "default"
- { name: "net.ipv4.ip_forward", value: 1}
- { name: "net.ipv4.conf.all.rp_filter", value: 0}
- { name: "net.ipv4.conf.default.rp_filter", value: 0}
when:
- set_sysctl | bool
- inventory_hostname in groups['neutron-l3-agent']

View File

@ -1,18 +1,11 @@
---
- name: Disabling netfilter for bridges
sysctl: name="net.bridge.bridge-nf-call-{{ item }}" value=1 sysctl_set=yes
- name: Setting sysctl values
sysctl: name={{ item.name }} value={{ item.value }} sysctl_set=yes
with_items:
- "iptables"
- "ip6tables"
when:
- set_sysctl | bool
- inventory_hostname in groups['compute']
- name: Disabling reverse path filter on compute node
sysctl: name="net.ipv4.conf.{{ item }}.rp_filter" value=0 sysctl_set=yes
with_items:
- "all"
- "default"
- { name: "net.bridge.bridge-nf-call-iptables", value: 1}
- { name: "net.bridge.bridge-nf-call-ip6tables", value: 1}
- { name: "net.ipv4.conf.all.rp_filter", value: 0}
- { name: "net.ipv4.conf.default.rp_filter", value: 0}
when:
- set_sysctl | bool
- inventory_hostname in groups['compute']