22 lines
		
	
	
		
			640 B
		
	
	
	
		
			YAML
		
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			640 B
		
	
	
	
		
			YAML
		
	
	
| ---
 | |
| - name: update inception
 | |
|   hosts: all
 | |
|   tasks:
 | |
|   # - name: Change to the app directory and update the repository
 | |
|   #   git:
 | |
|   #     repo: 'https://gt.eron.co/eron/inception.git'  # Replace with your repository URL
 | |
|   #     dest: /root/code/inception
 | |
|   #     version: master
 | |
|   #   register: git_result
 | |
|   - name: Go to the application directory
 | |
|     command: chdir=/root/code/inception git pull origin master
 | |
|     register: git_result
 | |
| 
 | |
|   - name: Build docker image if there were changes
 | |
|     docker_image:
 | |
|       source: build
 | |
|       build:
 | |
|         path: /root/code/inception
 | |
|       name: inception
 | |
|       tag: "13.2"
 | |
|     when: git_result.changed |