From 27fcb8b6ec716ae51e45b68de39d89671c6b397a Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Thu, 3 Nov 2022 21:49:56 +0100 Subject: [PATCH] create template env for build image --- inventory/group_vars/local | 8 ++++++-- inventory/group_vars/local_vault | 24 ++++++++++++++---------- inventory/hosts | 1 + scaleway-k8s/templates/env-build.j2 | 7 +++++++ scaleway-k8s/templates/main.tf.j2 | 4 ++-- 5 files changed, 30 insertions(+), 14 deletions(-) diff --git a/inventory/group_vars/local b/inventory/group_vars/local index 9e72108..e0943cc 100644 --- a/inventory/group_vars/local +++ b/inventory/group_vars/local @@ -1,4 +1,8 @@ project_terraform: "/home/valentin/terraform" region_k8s: "fr-par" -project_name: "terraform-test" -quarkus_project: "covas-quarkus" \ No newline at end of file +project_name_tf: "terraform-test" +quarkus_project: "covas-quarkus" + +mailer_host: "smtp.gmail.com" +mailer_from: "valczebackup@gmail.com" +mailer_port: "587" \ No newline at end of file diff --git a/inventory/group_vars/local_vault b/inventory/group_vars/local_vault index c9ed39a..e330945 100644 --- a/inventory/group_vars/local_vault +++ b/inventory/group_vars/local_vault @@ -1,11 +1,15 @@ $ANSIBLE_VAULT;1.1;AES256 -30366237393836333338316164656633656435383866666462663830643463633064356261396431 -3066613335326464373833346430373663333736353537630a653934316366383165346238663134 -30376439373634323636613566373534353138653964613236326464653662306136653964313861 -6135623361346639650a646533383761393435303833336138346164633161613739323765323664 -65623039633039343039303931626138316132613433666136633336326433653561343761316363 -66666230343165383130353939303633623264663161663030336533663437363630383565353064 -35376633323564623361613663356230663664323261383564653433656638306432343132343631 -32386232316234643464326533303065653535633064393438663931336334373965313064386532 -66306664303937356636366564623830623764386136663830636634326438373963666134613430 -6530323937303637393934376466396565343133613736663166 +65363666393931336562303562336163356633643832646633383864346538386436613363316661 +3766663332623564646630633232393830326262626231330a363035363237653930656362633561 +65666133376131643366393234623861613862646466383038656536656466343134666135363333 +3733313835383034380a643063373765356637373332636264653539363963326366646664336431 +66613265623364383933326165383162366464633037323366303931636136623835313334623131 +31666161623238346631316236643735653134306536663538646437343066323930383261646161 +62616361303630333230346263343937633461396362613963626433623264333039306530396136 +65623163383965326161383238366564393632323830333336623839636564623535643463356666 +61326634663834636336313233306535646366363437346262323939613937333831646466326264 +65363534303037376166663363306433303633383662316235343634343035323838663931613733 +33326563323332353765666639643462353935303064626266643339623238316233383837396631 +65376264346139353939396538313837636333643239623532333636653364646137356439323833 +35363730643336376361656366666136313431613337363533643539373865663766653161366530 +6339316532613964626139336236346635643638633439376662 diff --git a/inventory/hosts b/inventory/hosts index 093d215..5c5d87d 100644 --- a/inventory/hosts +++ b/inventory/hosts @@ -5,6 +5,7 @@ localhost ansible_host=127.0.0.1 [db] vps +localhost [db_vault:children] db diff --git a/scaleway-k8s/templates/env-build.j2 b/scaleway-k8s/templates/env-build.j2 index 6851bde..c6b9915 100644 --- a/scaleway-k8s/templates/env-build.j2 +++ b/scaleway-k8s/templates/env-build.j2 @@ -5,3 +5,10 @@ POSTGRES_URL={{ postgres_url }} POSTGRES_PORT={{ postgres_port }} REDIS_URL={{ redis_url }} REDIS_PORT={{ redis_port }} + + +MAILER_FROM={{ mailer_from }} +MAILER_HOST={{ mailer_host }} +MAILER_PORT={{ mailer_port }} +MAILER_USERNAME={{ mailer_username }} +MAILER_PASSWORD={{ mailer_password }} \ No newline at end of file diff --git a/scaleway-k8s/templates/main.tf.j2 b/scaleway-k8s/templates/main.tf.j2 index 0453bae..20bea91 100644 --- a/scaleway-k8s/templates/main.tf.j2 +++ b/scaleway-k8s/templates/main.tf.j2 @@ -8,8 +8,8 @@ terraform { } - resource "scaleway_k8s_cluster" "{{ project_name }}" { - name = "{{ project_name }}" + resource "scaleway_k8s_cluster" "{{ project_name_tf }}" { + name = "{{ project_name_tf }}" version = "1.24.3" cni = "cilium" project_id = "{{ project_id }}"