Created
          April 15, 2021 12:59 
        
      - 
      
 - 
        
Save svengo/fbd5000cf2ef5a1f877f25d4f94a266c to your computer and use it in GitHub Desktop.  
    Ansible update mailcow
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | --- | |
| - hosts: mailcow | |
| vars: | |
| mailcow_path: /srv/docker/mailcow-dockerized | |
| tasks: | |
| - name: Check for mailcow updates | |
| become: yes | |
| command: | |
| chdir: '{{ mailcow_path }}' | |
| argv: | |
| - /usr/bin/bash | |
| - -c | |
| - ./update.sh --check | |
| notify: Run mailcow update | |
| register: mailcow_update | |
| failed_when: ( mailcow_update.rc not in [ 0, 3 ] ) | |
| changed_when: mailcow_update.rc == 0 | |
| handlers: | |
| - name: Run mailcow update | |
| become: yes | |
| command: | |
| chdir: '{{ mailcow_path }}' | |
| argv: | |
| - /usr/bin/bash | |
| - -c | |
| - ./update.sh --force | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
Doesn't handle update.sh updates. Please use the official mailcow: dockerized - Ansible role instead!