summaryrefslogtreecommitdiff
path: root/ansible_tools/roles/set-zextras-custom-login-page/tasks/check_param.yml
diff options
context:
space:
mode:
authorAntoine Ouvrard <antoine.ouvrard@zextras.fr>2023-03-09 16:44:05 +0100
committerAntoine Ouvrard <antoine.ouvrard@zextras.fr>2023-03-09 16:44:05 +0100
commit38129c2455892386eb8c9171c90154192d5480ac (patch)
treefe0a52f9a2763b7248460cc42601dc6923b8184a /ansible_tools/roles/set-zextras-custom-login-page/tasks/check_param.yml
ajoute les archives
Diffstat (limited to 'ansible_tools/roles/set-zextras-custom-login-page/tasks/check_param.yml')
-rw-r--r--ansible_tools/roles/set-zextras-custom-login-page/tasks/check_param.yml63
1 files changed, 63 insertions, 0 deletions
diff --git a/ansible_tools/roles/set-zextras-custom-login-page/tasks/check_param.yml b/ansible_tools/roles/set-zextras-custom-login-page/tasks/check_param.yml
new file mode 100644
index 0000000..b8a0893
--- /dev/null
+++ b/ansible_tools/roles/set-zextras-custom-login-page/tasks/check_param.yml
@@ -0,0 +1,63 @@
+---
+- name: Check input variable
+ ansible.builtin.fail:
+ msg: |
+ la variable zimbraMailDomain est obligatoire pour
+ utiliser le role set-logo.
+ Veuillez la rajouter dans les host_vars
+ when:
+ - zimbraMailDomain is not defined
+
+- name: Check param - zmprov gd zimbraPublicServiceHostname
+ ansible.builtin.shell: |
+ set -e -o pipefail
+ /opt/zimbra/bin/zmprov gd {{ zimbraMailDomain }} zimbraPublicServiceHostname | sed -n 2p | awk '{print $2}'
+ register: zps_hostname
+ changed_when: false
+ args:
+ executable: /bin/bash
+
+- name: Stop run if zimbraPublicServiceHostname param not set
+ ansible.builtin.fail:
+ msg: |
+ Veuillez d'abord renseigner
+ la configuration zimbraPublicServiceHostname
+ du domaine {{ zimbraMailDomain }}
+ when:
+ - zps_hostname.stdout == ""
+
+- name: Check param - zmprov gd zimbraPublicServiceProtocol
+ ansible.builtin.shell: |
+ set -e -o pipefail
+ /opt/zimbra/bin/zmprov gd {{ zimbraMailDomain }} zimbraPublicServiceProtocol | sed -n 2p | awk '{print $2}'
+ register: zps_protocol
+ changed_when: false
+ args:
+ executable: /bin/bash
+
+- name: Stop run if zimbraPublicServiceProtocol param not set
+ ansible.builtin.fail:
+ msg: |
+ Veuillez d'abord renseigner
+ la configuration zimbraPublicServiceProtocol
+ du domaine {{ zimbraMailDomain }}
+ when:
+ - zps_protocol.stdout == ""
+
+- name: Check param - zmprov gd zimbraPublicServicePort
+ ansible.builtin.shell: |
+ set -e -o pipefail
+ /opt/zimbra/bin/zmprov gd {{ zimbraMailDomain }} zimbraPublicServicePort | sed -n 2p | awk '{print $2}'
+ register: zps_port
+ changed_when: false
+ args:
+ executable: /bin/bash
+
+- name: Stop run if zimbraPublicServicePort param not set
+ ansible.builtin.fail:
+ msg: |
+ Veuillez d'abord renseigner
+ la configuration zimbraPublicServicePort
+ du domaine {{ zimbraMailDomain }}
+ when:
+ - zps_port.stdout == ""