mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Implemented check for seeder to deal with anomaly. See: https://chat.openai.com/share/97827ab4-4589-4a9d-b056-55aad63ce22c
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user