mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Successfully implemented matrix whatsapp bridge
This commit is contained in:
13
tasks/create-and-seed-database.yml
Normal file
13
tasks/create-and-seed-database.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
# The following parameters need to be based:
|
||||
#
|
||||
# - database_instance
|
||||
# - database_name
|
||||
# - database_username
|
||||
# - database_password
|
||||
- name: "create {{database_name}} database"
|
||||
include_role:
|
||||
name: docker-postgres
|
||||
when: enable_central_database | bool
|
||||
|
||||
- name: "include seed-database-to-backup.yml"
|
||||
include_tasks: seed-database-to-backup.yml
|
18
tasks/seed-database-to-backup.yml
Normal file
18
tasks/seed-database-to-backup.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
- name: Display all database variables
|
||||
debug:
|
||||
msg: |
|
||||
database_instance: "{{ database_instance | default('undefined') }}"
|
||||
database_name: "{{ database_name | default('undefined') }}"
|
||||
database_username: "{{ database_username | default('undefined') }}"
|
||||
database_password: "{{ database_password | default('undefined') }}"
|
||||
when: mode_verbose | bool
|
||||
|
||||
- name: seed database values
|
||||
command:
|
||||
cmd: "python database_entry_seeder.py databases.csv {{database_instance}} {{database_name}} {{database_username}} {{database_password}}"
|
||||
chdir: "{{backup_docker_to_local_folder}}"
|
||||
when: >
|
||||
database_instance is defined and
|
||||
database_name is defined and
|
||||
database_username is defined and
|
||||
database_password is defined
|
Reference in New Issue
Block a user