Implemented check for seeder to deal with anomaly. See: https://chat.openai.com/share/97827ab4-4589-4a9d-b056-55aad63ce22c

This commit is contained in:
2024-01-13 16:19:11 +01:00
parent 72ee7f2fce
commit 7745105a23
11 changed files with 19 additions and 18 deletions

View File

@@ -46,14 +46,25 @@
state: absent
when: mode_reset | bool and run_once_backup_docker_to_local is not defined
- 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') }}"
database_host: "{{ database_host | default('undefined') }}"
database_type: "{{ database_type | 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_host is defined or
database_name is defined or
database_username is defined or
database_instance is defined and
database_name is defined and
database_username is defined and
database_password is defined
- name: Set file permissions for databases.csv to be readable, writable, and executable by root only
@@ -63,9 +74,9 @@
owner: root
group: root
when: >
(database_host is defined or
database_name is defined or
database_username is defined or
(database_instance is defined and
database_name is defined and
database_username is defined and
database_password is defined) and
run_once_backup_docker_to_local_file_permission is not defined
register: file_permission_result