airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From machris...@apache.org
Subject [airavata] branch group-based-auth updated: Don't download rpm if already downloaded
Date Tue, 17 Jul 2018 14:34:17 GMT
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch group-based-auth
in repository https://gitbox.apache.org/repos/asf/airavata.git


The following commit(s) were added to refs/heads/group-based-auth by this push:
     new 7a0cce1  Don't download rpm if already downloaded
7a0cce1 is described below

commit 7a0cce137e2a216dd33ec9a9f0560855bd706f37
Author: Marcus Christie <machristie@apache.org>
AuthorDate: Tue Jul 17 10:33:03 2018 -0400

    Don't download rpm if already downloaded
    
    I've run into some errors from Ansible trying to download the Oracle
    rpm. Looks like maybe Oracle is requiring authentication now, not sure.
    In any case, no point in fetching the rpm if it is already downloaded.
---
 dev-tools/ansible/roles/java/tasks/main.yml | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/dev-tools/ansible/roles/java/tasks/main.yml b/dev-tools/ansible/roles/java/tasks/main.yml
index 167a804..9dc481e 100644
--- a/dev-tools/ansible/roles/java/tasks/main.yml
+++ b/dev-tools/ansible/roles/java/tasks/main.yml
@@ -19,12 +19,18 @@
 #
 
 ---
-# Install Orcal Java
+- name: Check if oracle java 8 rpm already downloaded
+  stat:
+    path: "{{ java_dir_source }}/{{ java_rpm_filename }}"
+  register: rpm_stat_result
+
+# Install Oracle Java
 - name: download oracle java 8 rpm
   get_url: url="{{ java_rpm_url }}" dest="{{ java_dir_source }}" headers='Cookie:oraclelicense=accept-securebackup-cookie'
   become: yes
   tags:
        - always
+  when: not rpm_stat_result.stat.exists
 
 - name: Install oracle java 8
   yum: name="{{ java_dir_source }}/{{ java_rpm_filename }}" state=present


Mime
View raw message