current state + english docs
This commit is contained in:
@@ -1,10 +1,23 @@
|
||||
- name: Update mailcow (update.sh)
|
||||
hosts: all
|
||||
user: tincadmin
|
||||
become: true
|
||||
vars:
|
||||
github_mailcow_ver: "2025-09b" # GitHub Version Tag | Value to compare the current running mailcow version to.
|
||||
disk_space_percent_max: "97" # Number in percent | Defines the max allowed disk utilization until ansible is not updating mailcow automatically
|
||||
github_mailcow_ver: "2026-01" # GitHub Version Tag | Value to compare the current running mailcow version to.
|
||||
do_snapshots: true # Set to true to create Proxmox snapshots before updating mailcow
|
||||
debug: true # Or False if you dont' wanna see verbose outputs of role outputs
|
||||
|
||||
load_vault: true # Set to true to load vault file for sensitive data like Proxmox API tokens
|
||||
|
||||
pre_tasks:
|
||||
- name: Load vault vars (optional)
|
||||
ansible.builtin.include_vars:
|
||||
file: ../../vault.yml
|
||||
when: load_vault | bool
|
||||
no_log: true
|
||||
|
||||
tasks:
|
||||
|
||||
- import_role:
|
||||
name: roles/managed-mailcow
|
||||
tasks_from: find-mailcow-composedir.yml
|
||||
@@ -12,16 +25,52 @@
|
||||
- import_role:
|
||||
name: roles/managed-mailcow
|
||||
tasks_from: install-mailcow-components.yml
|
||||
when: mailcow_dir_result.files[0].path is defined
|
||||
|
||||
- ansible.builtin.import_role:
|
||||
name: roles/managed-mailcow
|
||||
tasks_from: check-mailcow-install-status.yml
|
||||
when: mailcow_dir_result.files[0].path is defined
|
||||
|
||||
- ansible.builtin.import_role:
|
||||
name: roles/managed-mailcow
|
||||
tasks_from: get-mailcow-current-version.yml
|
||||
when: mailcow_conf.stat.exists
|
||||
failed_when: local_mailcow_version is not defined
|
||||
|
||||
- name: Check Disk Utilization
|
||||
import_role:
|
||||
name: roles/system
|
||||
tasks_from: check-disk-utilization.yaml
|
||||
|
||||
- block:
|
||||
- name: Include Proxmox Info task
|
||||
ansible.builtin.include_role:
|
||||
name: proxmox-automation
|
||||
tasks_from: get-vmid
|
||||
|
||||
- name: Create Snapshot before Modifications
|
||||
ansible.builtin.include_role:
|
||||
name: proxmox-automation
|
||||
tasks_from: create-snapshots
|
||||
vars:
|
||||
snapshot_name: "pre-mailcow-update-{{ github_mailcow_ver }}"
|
||||
when:
|
||||
- do_snapshots
|
||||
- local_mailcow_version.stdout != github_mailcow_ver
|
||||
- disk_space_output.stdout | bool # Checks if snapshots are available, mailcow needs an update and disk space is sufficient if any of these is false no snapshot will be created
|
||||
- proxmox_host is defined
|
||||
- proxmox_user is defined
|
||||
- proxmox_token_id is defined
|
||||
- proxmox_token_secret is defined
|
||||
|
||||
|
||||
- import_role:
|
||||
name: roles/managed-mailcow
|
||||
tasks_from: update-mailcow.yml
|
||||
|
||||
- import_role:
|
||||
name: roles/docker
|
||||
tasks_from: restart-daemon.yml
|
||||
when: github_mailcow_ver == "2025-09b" # Only restart docker if mailcow was updated
|
||||
when: local_mailcow_version.stdout != github_mailcow_ver and disk_space_output.stdout | bool
|
||||
|
||||
- import_role:
|
||||
name: roles/docker
|
||||
tasks_from: cleanup-all.yml
|
||||
tasks_from: cleanup-all.yml
|
||||
when: update_mailcow is changed
|
||||
Reference in New Issue
Block a user