From 0f342c75d08ab01815e483025bf4817f740d71c0 Mon Sep 17 00:00:00 2001 From: Dmitriy Karbyshev Date: Fri, 3 Oct 2025 19:56:35 +0300 Subject: [PATCH] cast to bool when checking conditions --- tasks/setup_debian.yml | 6 +++--- tasks/setup_redhat.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tasks/setup_debian.yml b/tasks/setup_debian.yml index b0de0ec..fcc977d 100644 --- a/tasks/setup_debian.yml +++ b/tasks/setup_debian.yml @@ -1,6 +1,6 @@ --- - name: Install MariaDB official repository - when: mariadb_use_official_repo + when: mariadb_use_official_repo | bool block: - name: Install MariaDB repo necessary packages ansible.builtin.apt: @@ -45,7 +45,7 @@ owner: root group: root mode: "0644" - when: not mariadb_use_official_repo_format_deb822 + when: not mariadb_use_official_repo_format_deb822 | bool - name: Setup MariaDB repository sources entry ansible.builtin.copy: @@ -61,7 +61,7 @@ owner: root group: root mode: "0644" - when: mariadb_use_official_repo_format_deb822 + when: mariadb_use_official_repo_format_deb822 | bool - name: Prefer MariaDB repo over Debian repo ansible.builtin.copy: diff --git a/tasks/setup_redhat.yml b/tasks/setup_redhat.yml index 2df92c9..617777e 100644 --- a/tasks/setup_redhat.yml +++ b/tasks/setup_redhat.yml @@ -18,7 +18,7 @@ owner: root group: root mode: "0644" - when: mariadb_use_official_repo + when: mariadb_use_official_repo | bool - name: Install packages (dnf) ansible.builtin.dnf: @@ -36,7 +36,7 @@ - MariaDB-backup - python3-PyMySQL state: present - when: mariadb_use_official_repo + when: mariadb_use_official_repo | bool # the following is needed since MDBF packages server installation doesn't # create the run dir directory which should probably be fixed upstream. @@ -47,7 +47,7 @@ owner: "{{ mariadb_user }}" group: "{{ mariadb_user }}" mode: 0755 - when: mariadb_use_official_repo + when: mariadb_use_official_repo | bool - name: Check if mariadb command exists ansible.builtin.stat: