---
- name: Check if Zextras theme is present
  ansible.builtin.stat:
    path: /opt/zimbra/jetty/webapps/zimbra/skins/zextras/zextras.css
  register: zextras_theme_present

- name: Download Zextras Theme Installer
  ansible.builtin.unarchive:
    src: http://download.zextras.com/zextras-theme-installer/latest/zextras-theme-ubuntu.tgz
    dest: /tmp/
    remote_src: true
  when: not zextras_theme_present.stat.exists

- name: Install le theme zextras
  ansible.builtin.apt:
    deb: "/tmp/zextras-theme-installer/packages/zextras-theme_1.0.1_amd64.deb"
  when: not zextras_theme_present.stat.exists
  notify:
    - Restart Mailbox
