summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2015-06-01 15:37:50 -0700
committerJhon Honce <jhonce@redhat.com>2015-06-01 15:37:50 -0700
commit5ecbe78c384a134620180a0a6e10a997acf4005e (patch)
tree1ed7976590827601c9bf0a549a1b8d797b8e4d45 /roles
parenta2d9ea46fce456b2d4f890d6d321fa36e5cc6e2e (diff)
downloadopenshift-5ecbe78c384a134620180a0a6e10a997acf4005e.tar.gz
openshift-5ecbe78c384a134620180a0a6e10a997acf4005e.tar.bz2
openshift-5ecbe78c384a134620180a0a6e10a997acf4005e.tar.xz
openshift-5ecbe78c384a134620180a0a6e10a997acf4005e.zip
* Do not reinstall gem if it exists
Diffstat (limited to 'roles')
-rw-r--r--roles/fluentd_master/tasks/main.yml6
-rw-r--r--roles/fluentd_node/tasks/main.yml6
2 files changed, 12 insertions, 0 deletions
diff --git a/roles/fluentd_master/tasks/main.yml b/roles/fluentd_master/tasks/main.yml
index 9c558d92d..28caaa5b8 100644
--- a/roles/fluentd_master/tasks/main.yml
+++ b/roles/fluentd_master/tasks/main.yml
@@ -5,8 +5,14 @@
name: 'http://packages.treasuredata.com/2/redhat/7/x86_64/td-agent-2.2.0-0.x86_64.rpm'
state: present
+- name: Verify fluentd plugin installed
+ command: '/opt/td-agent/embedded/bin/gem query -i fluent-plugin-kubernetes'
+ register: _fluent_plugin_check
+ ignore_errors: yes
+
- name: install Kubernetes fluentd plugin
command: '/opt/td-agent/embedded/bin/gem install fluent-plugin-kubernetes'
+ when: _fluent_plugin_check.rc == 1
- name: Creates directories
file:
diff --git a/roles/fluentd_node/tasks/main.yml b/roles/fluentd_node/tasks/main.yml
index 951c5a229..2526057cb 100644
--- a/roles/fluentd_node/tasks/main.yml
+++ b/roles/fluentd_node/tasks/main.yml
@@ -5,8 +5,14 @@
name: 'http://packages.treasuredata.com/2/redhat/7/x86_64/td-agent-2.2.0-0.x86_64.rpm'
state: present
+- name: Verify fluentd plugin installed
+ command: '/opt/td-agent/embedded/bin/gem query -i fluent-plugin-kubernetes'
+ register: _fluent_plugin_check
+ ignore_errors: yes
+
- name: install Kubernetes fluentd plugin
command: '/opt/td-agent/embedded/bin/gem install fluent-plugin-kubernetes'
+ when: _fluent_plugin_check.rc == 1
- name: Override td-agent configuration file
template: