From 7a78d1e8a01719ffc60662ce4d4d44aed2e94ba3 Mon Sep 17 00:00:00 2001 From: Akos Balla Date: Thu, 30 May 2024 00:48:35 +0200 Subject: [PATCH] fix FQDN --- tasks/kolab/main.yml | 2 +- tasks/os/packages.yml | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/tasks/kolab/main.yml b/tasks/kolab/main.yml index ac78a63..c894b1e 100644 --- a/tasks/kolab/main.yml +++ b/tasks/kolab/main.yml @@ -4,7 +4,7 @@ # noqa yaml[line-length] ansible.builtin.command: "setup-kolab --default --timezone={{ ansible_date_time.tz }} \ --mysqlserver=existing --mysqlhost=127.0.0.1 --mysqlrootpw={{ mysql_root_password }} \ - --directory-manager-pwd={{ ldap_admin_password }} --fqdn={{ mailserver_domain }} \ + --directory-manager-pwd={{ ldap_admin_password }} --fqdn={{ mailserver_hostname }}.{{ mailserver_domain }} \ --domain={{ mailserver_domain }}" register: kolab_setup failed_when: kolab_setup.rc != 0 and "existing" not in kolab_setup.stderr diff --git a/tasks/os/packages.yml b/tasks/os/packages.yml index 58d070b..79183d9 100644 --- a/tasks/os/packages.yml +++ b/tasks/os/packages.yml @@ -240,9 +240,20 @@ - name: Enable the php:remi-7.4 DNF module tags: - always - ansible.builtin.command: dnf module enable php:remi-7.4 -y - register: enable_php74_module - changed_when: enable_php74_module.rc == 0 + block: + - name: Enable the php:remi-7.4 DNF module + ansible.builtin.command: dnf module enable php:remi-7.4 -y + register: enable_php74_module + changed_when: enable_php74_module.rc == 0 + rescue: + - name: Reset the php DNF module + ansible.builtin.command: dnf module reset php -y + register: enable_php74_module + changed_when: enable_php74_module.rc == 0 + - name: Enable the php:remi-7.4 DNF module + ansible.builtin.command: dnf module enable php:remi-7.4 -y + register: enable_php74_module + changed_when: enable_php74_module.rc == 0 - name: Install packages tags: - always