build image WIP

This commit is contained in:
Valentin CZERYBA 2022-10-15 22:49:00 +02:00
parent da8e10ef4e
commit e6f9d71c4f
3 changed files with 14 additions and 13 deletions

View File

@ -1,3 +1,4 @@
project_terraform: "/home/valentin/terraform"
region_k8s: "fr-par"
project_name: "terraform-test"
quarkus_project: "covas-quarkus"

View File

@ -4,6 +4,7 @@ localhost ansible_host=127.0.0.1
[db]
vps
localhost
[db_vault:children]
db

View File

@ -3,29 +3,28 @@
- name: git archive local
local_action:
module: git
repo: "https://{{ git_username | urlencode }}:{{ git_password | urlencode }}@git.valczeryba.ovh/v4l3n71n/{{ project_name }}.git"
repo: "https://{{ git_username | urlencode }}:{{ git_password | urlencode }}@git.valczeryba.ovh/v4l3n71n/{{ quarkus_project }}.git"
dest: "/home/valentin/src/"
archive: "/tmp/{{ project_name }}.tar.gz"
archive: "/tmp/{{ quarkus_project }}.tar.gz"
force: yes
update: yes
when: "project_name is defined"
when: "quarkus_project is defined"
- name: Create directory
file:
path: "{{ home_dir }}/{{ project_name }}"
path: "{{ home_dir }}/{{ quarkus_project }}"
state: directory
when: "project_name is defined"
when: "quarkus_project is defined"
- name: Extract covas liquibase
- name: Extract covas quarkus
unarchive:
src: "/tmp/{{ project_name }}.tar.gz"
dest: "{{ home_dir }}/{{ project_name }}"
when: "project_name is defined"
src: "/tmp/{{ quarkus_project }}.tar.gz"
dest: "{{ home_dir }}/{{ quarkus_project }}"
when: "quarkus_project is defined"
- name: Template env file
template:
src: "{{ project_env }}"
dest: "{{ home_dir }}/.env"
when: "project_env is defined"
src: "env-build.j2"
dest: "{{ home_dir }}/{{ quarkus_project }}/.env"