Skip to content

Instantly share code, notes, and snippets.

@svengo
Created April 15, 2021 12:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save svengo/fbd5000cf2ef5a1f877f25d4f94a266c to your computer and use it in GitHub Desktop.
Save svengo/fbd5000cf2ef5a1f877f25d4f94a266c to your computer and use it in GitHub Desktop.
Ansible update mailcow
---
- 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
@svengo
Copy link
Author

svengo commented Apr 17, 2021

Doesn't handle update.sh updates. Please use the official mailcow: dockerized - Ansible role instead!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment