Updated to support optional firewalling and version number.

This commit is contained in:
James Martin 2013-06-28 18:34:49 -04:00
parent 0138f10b32
commit a64a6455a1
4 changed files with 9 additions and 4 deletions

View file

@ -1,5 +1,7 @@
---
firewall: True
riak:
version: 1.3.1
iface: eth1
handoff_port: 8099
http_port: 8098

View file

@ -17,7 +17,7 @@
+W w
{% if ansible_processor_cores == 'NA' %}
{% if ansible_processor_cores == 'NA' or ansible_processor_cores == 1 %}
-smp enable
{% endif %}

View file

@ -1,8 +1,9 @@
---
- name: install riak
yum: name=riak state=present
yum: name=riak-{{ riak.version }} state=present
- name: configure iptables
template: src=iptables.j2 dest=/etc/sysconfig/iptables.riak owner=root group=root
notify:
- lokkit
- lokkit
when: firewall is defined

View file

@ -1,12 +1,14 @@
---
- name: install riak
apt: pkg=riak
apt: pkg=riak-{{ riak.version }}
- name: set the riak ulimit
copy: src=etc_default_riak_ulimit dest=/etc/default/riak
- name: configure iptables
template: src=iptables.j2 dest=/etc/ufw/applications.d/riak owner=root group=root mode=0644
when: firewall is defined
- name: update fw
ufw: enable=yes allow=riak
when: firewall is defined