Skip to content

Commit 3ca0908

Browse files
jylitaloCalum MacRae
authored and
Calum MacRae
committedJul 1, 2016
Support redis as transport protocol (sensu#24)
* remove trailing whitespace * Octal file permissions must contain leading zero and trailing whitespaces removed * change shell: tar into unarchive * Ubuntu 16.04 LST is called xenial * introduce new variable: sensu_transport. Valid values are rabbitmq and redis * depending on sensu_transport, install redis.json or rabbitmq.json, install transport.json and restart sensu-client
1 parent 35730d4 commit 3ca0908

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed
 

‎defaults/main.yml

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ sensu_include_dashboard: false
4343
sensu_master: false
4444
sensu_user_name: sensu
4545
sensu_remote_plugins: ~
46+
sensu_transport: rabbitmq
4647

4748
# Sensu/RabbitMQ SSL certificate properties
4849
sensu_ssl_gen_certs: true

‎meta/main.yml

+1
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ galaxy_info:
8989
# - utopic
9090
- vivid
9191
# - wily
92+
# - xenial
9293
#- name: SLES
9394
# versions:
9495
# - all

‎tasks/client.yml

+16
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,22 @@
1717
owner: "{{ sensu_user_name }}"
1818
group: "{{ sensu_group_name }}"
1919
src: rabbitmq.json.j2
20+
when: sensu_transport == "rabbitmq"
21+
22+
- name: Deploy Sensu client Redis configuration
23+
template:
24+
dest: "{{ sensu_config_path }}/conf.d/redis.json"
25+
owner: "{{ sensu_user_name }}"
26+
group: "{{ sensu_group_name }}"
27+
src: sensu-redis.json.j2
28+
when: sensu_transport == "redis"
29+
30+
- name: Deploy Sensu client transport configuration
31+
template:
32+
dest: "{{ sensu_config_path }}/conf.d/transport.json"
33+
owner: "{{ sensu_user_name }}"
34+
group: "{{ sensu_group_name }}"
35+
src: transport.json.j2
2036
notify: restart sensu-client service
2137

2238
- name: Deploy Sensu client service configuration

‎templates/transport.json.j2

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"transport": {
3+
"name": "{{ sensu_transport }}",
4+
"reconnect_on_error": true
5+
}
6+
}

0 commit comments

Comments
 (0)
Please sign in to comment.