[AB-137] fixing occurrences for templates in cases entities do not exist anymore

fixing feature mode retrieval to adapt to lowercase
fixing disable exp role creation and retrieval
removing ansible code
This commit is contained in:
Sheldan
2021-03-09 21:33:51 +01:00
parent d0c06538e3
commit e780b0e75c
29 changed files with 200 additions and 909 deletions

View File

@@ -1 +0,0 @@
ansible_python_interpreter: /usr/bin/python3

View File

@@ -1,8 +0,0 @@
---
- hosts: localhost
connection: local
gather_facts: no
roles:
- role: database

View File

@@ -1,10 +0,0 @@
---
- include_tasks: deploy_template_artifact.yaml
name: Deploying translations
vars:
group_id: "{{ artifact.group_id }}"
version: "{{ artifact.version }}"
with_items: "{{ artifact.modules }}"
loop_control:
loop_var: module

View File

@@ -1,46 +0,0 @@
---
- name: Prepare target directoy
delegate_to: localhost
file:
path: "{{ installer_base_dir }}/liquibase/{{ artifact.group_id }}/{{ artifact.module }}"
state: directory
mode: '0755'
- name: "Download liquibase artifact {{ artifact.module }} in {{ artifact.group_id }}"
delegate_to: localhost
maven_artifact:
group_id: "{{ artifact.group_id }}"
artifact_id: "{{ artifact.module }}"
dest: "{{ installer_base_dir }}/liquibase/{{ artifact.group_id }}-{{ artifact.module }}.zip"
extension: zip
version: "{{ artifact.version }}"
repository_url: "file://{{ lookup('env','HOME') }}/.m2/repository"
classifier: liquibase
- name: Extract artifact zip
delegate_to: localhost
unarchive:
src: "{{ installer_base_dir }}/liquibase/{{ artifact.group_id }}-{{ artifact.module }}.zip"
dest: "{{ installer_base_dir }}/liquibase/{{ artifact.group_id }}/{{ artifact.module }}"
- name: Render liquibase.properties template
template:
src: liquibase.properties.j2
dest: "{{ installer_base_dir }}/liquibase/{{ artifact.group_id }}/{{ artifact.module }}/liquibase.properties"
vars:
- change_log_file: "{{ installer_base_dir }}//liquibase/{{ artifact.group_id }}/{{ artifact.module }}/{{ artifact.file }}"
- name: Run liquibase migration
shell: "{{ liquibase_path }}/liquibase --defaultsFile={{ installer_base_dir }}/liquibase/{{ artifact.group_id }}/{{ artifact.module }}/liquibase.properties --liquibaseSchemaName=abstracto --liquibaseCatalogName=abstracto --logLevel=info update"
- name: Cleanup folder
file:
path: "{{ installer_base_dir }}/liquibase/{{ artifact.group_id }}"
state: absent
- name: Cleanup zip
file:
path: "{{ installer_base_dir }}/liquibase/{{ artifact.group_id }}-{{ artifact.module }}.zip"
state: absent

View File

@@ -1,35 +0,0 @@
---
- name: Prepare target directoy
delegate_to: localhost
file:
path: "{{ installer_base_dir }}/templates/{{ group_id }}/{{ module }}"
state: directory
mode: '0755'
- name: Download template artifact {{ module }} in {{ group_id }}
delegate_to: localhost
maven_artifact:
group_id: "{{ group_id }}"
artifact_id: "{{ module }}"
dest: "{{ installer_base_dir }}/templates/{{ group_id }}-{{ module }}.zip"
extension: zip
version: "{{ version }}"
repository_url: "file://{{ lookup('env','HOME') }}/.m2/repository"
- name: Extract artifact zip
delegate_to: localhost
unarchive:
src: "{{ installer_base_dir }}/templates/{{ group_id }}-{{ module }}.zip"
dest: "{{ installer_base_dir }}/templates/{{ group_id }}/{{ module }}"
- name: Deploy templates
script: deploy_templates.py "{{ installer_base_dir }}/templates/{{ group_id }}/{{ module }}"
args:
executable: "{{ ansible_python_interpreter }}"
- name: Cleanup folder
file:
path: "{{ installer_base_dir }}/templates/"
state: absent

View File

@@ -1,23 +0,0 @@
---
- name: Include custom variables
include_vars:
dir: "{{ installer_base_dir }}/ansible"
depth: 1
- include_tasks: deploy_liquibase_change_log.yaml
name: Deploying abstracto liquibase changelogs
with_items: "{{ liquibase_artifacts }}"
loop_control:
loop_var: artifact
when: execute_liquibase
- include_tasks: deploy_artifacts.yaml
name: Deploying abstracto templates
with_items: "{{ template_artifacts }}"
loop_control:
loop_var: artifact
when: execute_templates

View File

@@ -1,19 +0,0 @@
custom_template_artifacts: []
liquibase_artifacts: []
db_credentials:
host: "{{ lookup('env','DB_HOST') }}"
port: "{{ lookup('env','DB_PORT') }}"
database: "{{ lookup('env','DB_NAME') }}"
user: "{{ lookup('env','DB_USER') }}"
password: "{{ lookup('env','DB_PASS') }}"
liquibase_path: "{{ lookup('env','LIQUIBASE_PATH') }}"
postgres_driver_path: "{{ lookup('env','POSTGRES_DRIVER_PATH') }}"
installer_base_dir: "/tmp/installer"
execute_liquibase_input: yes
execute_templates_input: yes
execute_liquibase: "{{ True if (execute_liquibase_input | bool) else False }}"
execute_templates: "{{ True if (execute_templates_input | bool) else False }}"