39 lines
1.4 KiB
YAML
39 lines
1.4 KiB
YAML
- name: Deploy Webapp-Deployer UI
|
|
hosts: "{{ target_host }}"
|
|
|
|
environment:
|
|
PATH: "{{ ansible_env.PATH }}:/home/{{ansible_user}}/bin"
|
|
|
|
vars_files:
|
|
- vars/webapp-vars.yml
|
|
- vars/dns-vars.yml
|
|
- vars/k8s-vars.yml
|
|
|
|
tasks:
|
|
- name: Clone webapp-deployment-status-ui repository
|
|
git:
|
|
repo: "https://git.vdb.to/cerc-io/webapp-deployment-status-ui.git"
|
|
dest: "{{ ansible_env.HOME }}/cerc/webapp-deployment-status-ui"
|
|
update: yes
|
|
|
|
- name: Build webapp-deployer-status-ui
|
|
command: laconic-so build-webapp --source-repo {{ ansible_env.HOME }}/cerc/webapp-deployment-status-ui
|
|
|
|
- name: Create a deployment for webapp-ui
|
|
command: |
|
|
laconic-so deploy-webapp create --kube-config {{ ansible_env.HOME }}/.kube/config-default.yaml
|
|
--image-registry container-registry.pwa.{{ full_domain }} --deployment-dir webapp-ui
|
|
--image cerc/webapp-deployment-status-ui:local --url https://webapp-deployer-ui.pwa.{{ full_domain }}
|
|
--env-file ~/cerc/webapp-deployment-status-ui/.env
|
|
|
|
- name: Push image to container registry
|
|
command: laconic-so deployment --dir webapp-ui push-images
|
|
|
|
- name: Update config file for webapp ui
|
|
template:
|
|
src: "./templates/configs/webapp-ui-config.env.j2"
|
|
dest: "webapp-ui/config.env"
|
|
|
|
- name: Start the deployer ui
|
|
command: laconic-so deployment --dir webapp-ui start
|