28 lines
733 B
YAML
28 lines
733 B
YAML
---
|
|
- name: Deploy BAB Frontend Application
|
|
hosts: bab1.mgmt.toal.ca
|
|
become: false
|
|
tasks:
|
|
- name: Create temporary directory
|
|
ansible.builtin.tempfile:
|
|
state: directory
|
|
suffix: .deploy
|
|
register: tempdir
|
|
|
|
- name: Download tar.gz file from url
|
|
ansible.builtin.get_url:
|
|
url: "{{ artifact_url }}"
|
|
dest: "/{{ tempdir.path }}/bab-release.tar.gz"
|
|
mode: '0644'
|
|
|
|
- name: Extract tar into /usr/share/nginx/html/
|
|
ansible.builtin.unarchive:
|
|
src: "/{{ tempdir.path }}/bab-release.tar.gz"
|
|
dest: /usr/share/nginx/html/
|
|
remote_src: true
|
|
|
|
- name: Clean up
|
|
ansible.builtin.file:
|
|
path: "{{ tempdir.path }}"
|
|
state: absent
|