Move _ansible directory into main directory
This commit is contained in:
		
							parent
							
								
									519882db43
								
							
						
					
					
						commit
						40742e3214
					
				
					 124 changed files with 246 additions and 141 deletions
				
			
		
							
								
								
									
										44
									
								
								roles/webhook/tasks/main.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								roles/webhook/tasks/main.yml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,44 @@
 | 
			
		|||
---
 | 
			
		||||
- name: Set common facts
 | 
			
		||||
  ansible.builtin.import_tasks: tasks/set-default-facts.yml
 | 
			
		||||
 | 
			
		||||
- name: Deploy {{ svc.name }}
 | 
			
		||||
  vars:
 | 
			
		||||
    svc: "{{ webhook_svc }}"
 | 
			
		||||
    compose: "{{ webhook_compose }}"
 | 
			
		||||
    env: "{{ webhook_env }}"
 | 
			
		||||
    yml: "{{ webhook_yml }}"
 | 
			
		||||
  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: service.yml.j2
 | 
			
		||||
        dest: "{{ (config_path, 'hooks.yml') | path_join }}"
 | 
			
		||||
        mode: "0644"
 | 
			
		||||
      register: cmd_result
 | 
			
		||||
 | 
			
		||||
    - name: Set the docker force-recreate flag
 | 
			
		||||
      ansible.builtin.set_fact:
 | 
			
		||||
        docker_force_recreate: --force-recreate
 | 
			
		||||
      when: cmd_result.changed # noqa: no-handler We need to handle the restart per service. Handlers don't support variables.
 | 
			
		||||
 | 
			
		||||
    - name: Copy the teamspeak-fallback-db script
 | 
			
		||||
      ansible.builtin.copy:
 | 
			
		||||
        src: teamspeak-fallback-db
 | 
			
		||||
        dest: "{{ (config_path, 'teamspeak-fallback-db') | path_join }}"
 | 
			
		||||
        mode: "0755"
 | 
			
		||||
 | 
			
		||||
    - name: Import start tasks for common service
 | 
			
		||||
      ansible.builtin.import_tasks: tasks/start-common-service.yml
 | 
			
		||||
		Reference in a new issue