mirror of
				https://github.com/kevinveenbirkenbach/computer-playbook.git
				synced 2025-10-31 02:10:05 +00:00 
			
		
		
		
	Optimized database backup seeder implementation
This commit is contained in:
		
							
								
								
									
										3
									
								
								Todo.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								Todo.md
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| # Todos | ||||
| - Implement multi language | ||||
| - Implement rbac administration interface | ||||
| @@ -23,14 +23,19 @@ | ||||
|      database_password is defined) | ||||
|  | ||||
| - name: "seed database values in directory {{ backup_docker_to_local_folder }}" | ||||
|   command: | ||||
|     cmd: "python database_entry_seeder.py databases.csv {{database_instance}} {{database_name}} {{database_username}} {{database_password}}" | ||||
|   command: > | ||||
|     python database_entry_seeder.py databases.csv | ||||
|     "{{ database_instance }}" | ||||
|     "{{ database_name }}" | ||||
|     "{{ database_username }}" | ||||
|     "{{ database_password }}" | ||||
|   args: | ||||
|     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 | ||||
|   when: | ||||
|     - database_instance is defined | ||||
|     - database_name is defined | ||||
|     - database_username is defined | ||||
|     - database_password is defined | ||||
|  | ||||
| - name: Set file permissions for databases.csv to be readable, writable, and executable by root only | ||||
|   ansible.builtin.file: | ||||
|   | ||||
| @@ -3,9 +3,9 @@ bbb_repository_directory:     "{{ docker_compose.directories.services }}" | ||||
| docker_compose_file_origine:  "{{ docker_compose.directories.services }}docker-compose.yml" | ||||
| docker_compose_file_final:    "{{ docker_compose.directories.instance }}docker-compose.yml" | ||||
| database_instance:            "bigbluebutton" | ||||
| database_name:                "greenlight-v3" | ||||
| database_name:                "" # Database name is empty, because bb uses multiple databases | ||||
| database_username:            "postgres" | ||||
| database_password:            "{{applications.bigbluebutton.postgresql_secret}}" | ||||
| database_password:            "{{ applications.bigbluebutton.credentials.postgresql_secret }}" | ||||
| domain: 	                    "{{ domains[application_id] }}" | ||||
| http_port: 	                  "{{ ports.localhost.http[application_id] }}" | ||||
| bbb_env_file_link:            "{{ docker_compose.directories.instance }}.env"     | ||||
|   | ||||
| @@ -1,2 +1,2 @@ | ||||
| configuration_destination:        "{{nginx.directories.http.servers}}{{domain}}.conf" | ||||
| final_oauth2_enabled:             "{{applications[application_id].get('oauth2_proxy', {}).get('enabled', False)}}" | ||||
| final_oauth2_enabled:             "{{applications[application_id].get('features', {}).get('oauth2', False)}}" | ||||
| @@ -6,15 +6,9 @@ | ||||
|         cmd: "pkgmgr update pkgmgr" | ||||
|       when: run_once_pkgmgr_update is not defined | ||||
|  | ||||
|     - name: clone {{ package_name }} | ||||
|       command: | ||||
|         cmd: "pkgmgr clone {{ package_name }} --clone-mode https" | ||||
|       notify: "{{ package_notify | default(omit) }}" | ||||
|       ignore_errors: true | ||||
|  | ||||
|     - name: update {{ package_name }} | ||||
|       command: | ||||
|         cmd: "pkgmgr update {{ package_name }} --dependencies" | ||||
|         cmd: "pkgmgr update {{ package_name }} --dependencies --clone-mode https" | ||||
|       notify: "{{ package_notify | default(omit) }}" | ||||
|  | ||||
|     - name: mark pkgmgr update as done | ||||
|   | ||||
							
								
								
									
										3
									
								
								tasks/TODO.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								tasks/TODO.md
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| # todo | ||||
| - Move update-repository-with-files.yml to own role | ||||
| - Move copy-docker-compose-and-env.yml to own role | ||||
| @@ -1,10 +1,11 @@ | ||||
| # It isn't best practice to use this task | ||||
| # Better load the repositories into /opt/docker/[servicename]/services, build them there and then use a docker-compose file for customizing | ||||
| # @todo Refactor\Remove  | ||||
| # @deprecated | ||||
| - name: "Merge detached_files with applications.oauth2_proxy.configuration_file" | ||||
|   ansible.builtin.set_fact: | ||||
|     merged_detached_files: "{{ detached_files + [applications.oauth2_proxy.configuration_file] }}" | ||||
|   when: applications[application_id].get('oauth2_proxy', {}).get('enabled', False) | bool | ||||
|   when: applications[application_id].get('features', {}).get('oauth2', False) | bool | ||||
|  | ||||
| - name: "backup detached files" | ||||
|   command: > | ||||
|   | ||||
		Reference in New Issue
	
	Block a user