Add very basic deployment service based on webhook
This commit is contained in:
		
							parent
							
								
									a70ea6ef2a
								
							
						
					
					
						commit
						5d22308f0f
					
				
					 5 changed files with 92 additions and 0 deletions
				
			
		
							
								
								
									
										37
									
								
								playbooks/roles/deploy/tasks/main.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								playbooks/roles/deploy/tasks/main.yml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,37 @@ | |||
| --- | ||||
| - name: Set common facts | ||||
|   ansible.builtin.import_tasks: tasks/set-default-facts.yml | ||||
| 
 | ||||
| - name: Deploy {{ role_name }} | ||||
|   vars: | ||||
|     svc: "{{ deploy_svc }}" | ||||
|     yml: "{{ deploy_yml }}" | ||||
|     compose: "{{ deploy_compose }}" | ||||
|   block: | ||||
|     - name: Import prepare tasks for common service | ||||
|       ansible.builtin.import_tasks: tasks/prepare-common-service.yml | ||||
| 
 | ||||
|     - name: Set webhook config path | ||||
|       ansible.builtin.set_fact: | ||||
|         config_path: "{{ (service_path, 'config') | path_join }}" | ||||
| 
 | ||||
|     - name: Create config directory | ||||
|       ansible.builtin.file: | ||||
|         path: "{{ config_path }}" | ||||
|         state: directory | ||||
|         mode: "0755" | ||||
| 
 | ||||
|     - name: Template main config | ||||
|       ansible.builtin.template: | ||||
|         src: yml.j2 | ||||
|         dest: "{{ (config_path, 'hooks.yml') | path_join }}" | ||||
|         mode: "0644" | ||||
| 
 | ||||
|     - name: Copy the deploy-reitanlage_oranienburg script | ||||
|       ansible.builtin.copy: | ||||
|         src: deploy-reitanlage_oranienburg | ||||
|         dest: "{{ (config_path, 'deploy-reitanlage_oranienburg') | path_join }}" | ||||
|         mode: "0755" | ||||
| 
 | ||||
|     - name: Import start tasks for common service | ||||
|       ansible.builtin.import_tasks: tasks/start-common-service.yml | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue