Download source via url

This commit is contained in:
root 2022-01-12 09:13:53 -06:00
commit ef81faefdf
5 changed files with 47 additions and 8 deletions

View file

@ -2,7 +2,7 @@
- assert:
that:
- zipfile_dest is defined
- (rhn_username is defined and rhn_password is defined and rhn_id_file is defined) or rhsso_zip_file_local_path is defined
- (rhn_username is defined and rhn_password is defined and rhn_id_file is defined) or rhsso_zip_file_local_path is defined or rhsso_source_download_url is defined
quiet: true
- set_fact:
@ -13,7 +13,7 @@
path: "{{ zipfile_dest }}"
register: archive_path
- name: "Install zipfile from RHN: {{ rhn_download_url }}"
- name: "Download zipfile from RHN: {{ rhn_download_url }}"
redhat_csp_download:
url: "{{ rhn_download_url }}"
dest: "{{ zipfile_dest }}"
@ -24,7 +24,20 @@
- archive_path is defined
- archive_path.stat is defined
- not archive_path.stat.exists
- not rhsso_zip_file_local_path is defined
- rhsso_rhn_id is defined
- name: "Copy zipfile from source like Nexus etc : {{ rhsso_source_download_url }}"
get_url:
url: "{{ rhsso_source_download_url }}"
dest: "{{ zipfile_dest }}"
owner: "{{ keycloak_service_user }}"
group: "{{ keycloak_service_group }}"
mode: 0750
when:
- archive_path is defined
- archive_path.stat is defined
- not archive_path.stat.exists
- rhsso_source_download_url is defined
- name: "Copy zipfile from local source: {{ rhsso_zip_file_local_path }}"
ansible.builtin.copy:

View file

@ -105,7 +105,7 @@
- block:
- assert:
that:
- rhsso_rhn_id is defined or rhsso_zip_file_local_path is defined
- rhsso_rhn_id is defined or rhsso_zip_file_local_path is defined or rhsso_source_download_url is defined
quiet: true
fail_msg: "Can't install RHSSO without either RHN ID or RHSSO zip file local path"