mirror of
				https://github.com/kevinveenbirkenbach/computer-playbook.git
				synced 2025-10-31 18:29:21 +00:00 
			
		
		
		
	Renamed applications.discourse to use application_id
This commit is contained in:
		| @@ -1,14 +1,14 @@ | ||||
| --- | ||||
| - name: "stop and remove discourse container if it exist" | ||||
|   docker_container: | ||||
|     name: "{{applications.discourse.container}}" | ||||
|     name: "{{applications[application_id].container}}" | ||||
|     state: absent | ||||
|   register: container_action | ||||
|   failed_when: container_action.failed and 'No such container' not in container_action.msg | ||||
|   listen: recreate discourse | ||||
|    | ||||
| - name: "add central database temporary to {{application_id}}_default" | ||||
|   command: docker network connect {{applications.discourse.network}} central-{{ database_type }} | ||||
|   command: docker network connect {{applications[application_id].network}} central-{{ database_type }} | ||||
|   failed_when: > | ||||
|     result.rc != 0 and | ||||
|     'already exists in network' not in result.stderr | ||||
| @@ -18,6 +18,6 @@ | ||||
|  | ||||
| - name: rebuild discourse | ||||
|   command: | ||||
|     cmd: "./launcher rebuild {{applications.discourse.container}}" | ||||
|     cmd: "./launcher rebuild {{applications[application_id].container}}" | ||||
|     chdir: "{{docker_repository_directory }}" | ||||
|   listen: recreate discourse | ||||
| @@ -22,7 +22,7 @@ | ||||
|  | ||||
| - name: "cleanup central database from {{application_id}}_default network" | ||||
|   command: | ||||
|     cmd: "docker network disconnect {{applications.discourse.network}} central-{{ database_type }}" | ||||
|     cmd: "docker network disconnect {{applications[application_id].network}} central-{{ database_type }}" | ||||
|   ignore_errors: true | ||||
|   when:  | ||||
|     - mode_reset | bool | ||||
| @@ -78,9 +78,9 @@ | ||||
|   meta: flush_handlers | ||||
|   when: run_once_docker_discourse is not defined | ||||
|  | ||||
| - name: "add {{applications.discourse.container}} to network central_postgres" | ||||
| - name: "add {{applications[application_id].container}} to network central_postgres" | ||||
|   command: | ||||
|     cmd: "docker network connect central_postgres {{applications.discourse.container}}" | ||||
|     cmd: "docker network connect central_postgres {{applications[application_id].container}}" | ||||
|   ignore_errors: true | ||||
|   when: | ||||
|     - applications | is_feature_enabled('central_database',application_id) | ||||
| @@ -88,7 +88,7 @@ | ||||
|    | ||||
| - name: "remove central database from {{application_id}}_default" | ||||
|   command: | ||||
|     cmd: "docker network disconnect {{applications.discourse.network}} central-{{ database_type }}" | ||||
|     cmd: "docker network disconnect {{applications[application_id].network}} central-{{ database_type }}" | ||||
|   ignore_errors: true | ||||
|   when: | ||||
|     - applications | is_feature_enabled('central_database',application_id) | ||||
|   | ||||
| @@ -143,4 +143,4 @@ run: | ||||
|  | ||||
| docker_args: | ||||
|   - --network={{application_id}}_default | ||||
|   - --name={{applications.discourse.container}} | ||||
|   - --name={{applications[application_id].container}} | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| application_id:                         "discourse" | ||||
| database_password:                      "{{ applications.discourse.credentials.database_password }}" | ||||
| database_password:                      "{{ applications[application_id].credentials.database_password }}" | ||||
| database_type:                          "postgres" | ||||
| docker_repository_directory :           "{{docker_compose.directories.services}}{{applications.discourse.repository}}/" | ||||
| discourse_application_yml_destination:  "{{docker_repository_directory }}containers/{{applications.discourse.container}}.yml" | ||||
| docker_repository_directory :           "{{docker_compose.directories.services}}{{applications[application_id].repository}}/" | ||||
| discourse_application_yml_destination:  "{{docker_repository_directory }}containers/{{applications[application_id].container}}.yml" | ||||
		Reference in New Issue
	
	Block a user