浏览代码

checking for sso zip as well

Grega Bremec 2 年之前
父节点
当前提交
ee46ef2fc5
共有 2 个文件被更改,包括 10 次插入1 次删除
  1. 1 1
      inventory
  2. 9 0
      roles/check-env/tasks/main.yml

+ 1 - 1
inventory

@@ -6,4 +6,4 @@ bastion.lab.example.com ansible_user=root
 [all:vars]
 ocp_maj = "4.10"
 ocp_z = "4.10.3"
-
+sso_z = "7.6.0"

+ 9 - 0
roles/check-env/tasks/main.yml

@@ -52,4 +52,13 @@
     validate_certs: no
   loop: "{{ clusters }}"
 
+- name: Check RHSSO ZIP is there
+  stat:
+    path: "{{ ansible_facts['user_home'] }}/Downloads/rh-sso-{{ sso_z }}-server-dist.zip"
+  register: sso_zip
+  when: need_zip
+
+- assert:
+    that: sso_zip.stat.exists
+  when: need_zip
 ...