summaryrefslogtreecommitdiff
path: root/ansible_tools/roles/set-zextras-global-login-logo/tasks/main.yml
blob: 191f55067cc9ca4c2e72e343660b7df79dfee222 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
---
- name: Vérification de la présence des paramètres d'entrées dans les variables
  ansible.builtin.fail:
    msg: |
      la variable {{ item }} est obligatoire pour
      utiliser le role set-logo.
      Veuillez la rajouter dans les host_vars
  when:
    - item is not defined
  loop:
    - zimbraSkinLoginBackgroundImage

- name: Get param - zxsuite auth loginPage getBackgroundImage global
  ansible.builtin.shell: |
    set -e -o pipefail
    /opt/zimbra/bin/zxsuite auth loginPage getBackgroundImage global
  register: logo_path
  changed_when: false
  args:
    executable: /bin/bash

- name: Set param - zxsuite auth loginPage setBackgroundImage
  ansible.builtin.command: "/opt/zimbra/bin/zxsuite auth loginPage setBackgroundImage global {{ zimbraSkinLoginBackgroundImage }}"
  when: logo_path.stdout != zimbraSkinLoginBackgroundImage