Commit 32ebb4ab authored by Birin Sanchez's avatar Birin Sanchez

ldh_middleware role: Install .deb from GitLab as default.

Signed-off-by: Birin Sanchez's avatarBirin Sanchez <birin.sanchez@puri.sm>
parent aa9f6cac
Pipeline #4515 passed with stage
in 1 minute and 14 seconds
......@@ -45,7 +45,8 @@
ldh_nginx_ssl_key_path: "/etc/ssl/private/{{ ansible_fqdn }}.key.plain"
ldh_nginx_log_error: true
# Location of Debian file used to install Keel/LDH. Uncomment next
# line and update the absolute path where you stored your .deb
# file.
# By default Keel/LDH role will download the .deb file from
# GitLab. Set ldh_deb_file variable to the absolute path of
# the .deb you want to use instead.
# ldh_deb_file: /tmp/ldh-middleware_latest.deb
......@@ -2,6 +2,7 @@
# defaults file for ldh_middleware
ldh_required_packages:
- rabbitmq-server
- unzip
ldh_site_tile: Title
ldh_site_byline: Example byline
......@@ -44,4 +45,4 @@ ldh_nginx_ssl_key_src_path: "cert_keys/example.com.key.plain"
ldh_nginx_ssl_key_path: "/etc/ssl/private/example.com.key.plain"
ldh_nginx_https_redirect: "https://example.com"
ldh_deb_file: /tmp/ldh-middleware_latest.deb
ldh_gitlab_deb_artifact: "https://source.puri.sm/liberty/ldh_middleware/-/jobs/artifacts/master/download?job=deb"
......@@ -6,9 +6,38 @@
update_cache: yes
cache_valid_time: 600
- name: Download .deb file from GitLab
block:
- name: Check if .deb file was already downloaded
find:
paths: /tmp
patterns: 'ldh-middleware_*.deb'
file_type: file
register: find_result
- name: Download and unzip Keel/LDH from GitLab
unarchive:
src: "{{ ldh_gitlab_deb_artifact }}"
dest: /tmp
remote_src: yes
when: find_result.matched == 0
- name: Find the name of the downloaded .deb file
find:
paths: /tmp
patterns: 'ldh-middleware_*.deb'
file_type: file
register: find_result
- name: Install ldh_middleware from downloaded .deb
apt:
deb: "{{ find_result.files[0].path }}"
when: ldh_deb_file is not defined
- name: Install ldh_middleware from .deb
apt:
deb: "{{ ldh_deb_file }}"
when: ldh_deb_file is defined
- name: Copy sample link_profile to config location
copy:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment