Skip to content

Commit 2e89859

Browse files
committed
fix #578 Ansible 12 support - broken conditionals
1 parent 246768f commit 2e89859

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

tasks/configure.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
owner: root
3030
group: root
3131
mode: 0755
32-
when: mysql_config_include_files | length
32+
when: mysql_config_include_files | length | bool
3333

3434
- name: Copy my.cnf override files into include directory.
3535
ansible.builtin.template:
@@ -71,8 +71,10 @@
7171
args:
7272
creates: "{{ mysql_log_error }}"
7373
when:
74-
- mysql_log | default(true)
75-
- mysql_log_error | default(false)
74+
- mysql_log is defined
75+
- mysql_log | length > 0
76+
- mysql_log_error is defined
77+
- mysql_log_error | length > 0
7678
tags: ['skip_ansible_galaxy']
7779

7880
- name: Set ownership on error log file (if configured).
@@ -83,8 +85,10 @@
8385
group: "{{ mysql_log_file_group }}"
8486
mode: 0640
8587
when:
86-
- mysql_log | default(true)
87-
- mysql_log_error | default(false)
88+
- mysql_log is defined
89+
- mysql_log | length > 0
90+
- mysql_log_error is defined
91+
- mysql_log_error | length > 0
8892
tags: ['skip_ansible_galaxy']
8993

9094
- name: Ensure MySQL is started and enabled on boot.

0 commit comments

Comments
 (0)