arvindshmicrosoft commented on a change in pull request #338: WIP# 254 
URL: https://github.com/apache/fluo-muchos/pull/338#discussion_r401953870
 
 

 ##########
 File path: ansible/roles/elasticsearch/tasks/main.yml
 ##########
 @@ -0,0 +1,78 @@
+---
+#
+# Installing Elasticsearch
+#
+
+ # Add the Elasticsearch yum repo. 
+
+- name: "download elasticsearch rpm"
+  get_url: 
+  args:
+    url: https://artifacts.elastic.co/downloads/elasticsearch/{{ 
elasticsearch_rpm }}
+    dest: /tmp/{{ elasticsearch_rpm }}
+    force: no  
+  
+#Check for file exists 
+
+- name: "check that file exists in directory"
+  stat: 
+    path: /tmp/{{ elasticsearch_rpm }}
+    register: stat_result
+
+ #Install elasticsearch    
+
+- name: "ensure elasticsearch is installed"
+  become: true
+  yum: name=/tmp/{{ elasticsearch_rpm }} state=present
+  when: stat_result.stat.exists == False
+
 
 Review comment:
   Could do `not stat_result.stat.exists` rather than the comparison to False

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to