From 0bdd03bc9fcd197cde6df2fe928177f760781306 Mon Sep 17 00:00:00 2001 From: Patrick Toal Date: Wed, 20 Dec 2023 13:44:58 -0500 Subject: [PATCH] Test deploy workflow with hard-coded values --- deploy_application.yml | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/deploy_application.yml b/deploy_application.yml index 31c61a6..d250649 100644 --- a/deploy_application.yml +++ b/deploy_application.yml @@ -2,15 +2,24 @@ - name: Deploy BAB Frontend Application hosts: bab1.mgmt.toal.ca become: true + vars: + artifact_url: https://gitea.toal.ca/oys/bab-app/actions/runs/10/artifacts/build-artifact-0.0.2.10 tasks: - - name: Ensure rsync is installed on RHEL9 host - ansible.builtin.package: - name: rsync - state: present + - name: Download zip file from url + ansible.builtin.get_url: + url: "{{ artifact_url }}" + dest: /tmp/BABFrontend.zip + mode: '0644' - - name: Synchronize local directory to remote, deleting missing files - ansible.posix.synchronize: - src: '{{ bab_app_build_output_dir }}' - dest: '{{ bab_app_webroot }}' - delete: true + - name: Unzip file to temp directory + ansible.builtin.unarchive: + src: /tmp/BABFrontend.zip + dest: /tmp + remote_src: true + + - name: Extract tgz file to nginx directory + ansible.builtin.unarchive: + src: /tmp/build-artifact-0.0.2.10/build-0.0.2.tar.gz + dest: /usr/share/nginx/html + remote_src: true