|
1 | 1 | ---
|
2 |
| -- name: Handle MariaDB nodes |
3 |
| - when: not mariadb.galera.arbitrator |
| 2 | +- name: Configure MariaDB (FreeBSD) |
| 3 | + when: ansible_system == 'FreeBSD' |
4 | 4 | block:
|
5 |
| - - name: Configure MariaDB (FreeBSD) |
6 |
| - when: ansible_system == 'FreeBSD' |
7 |
| - block: |
8 |
| - - name: Get MariaDB server version |
9 |
| - check_mode: no |
10 |
| - ansible.builtin.shell: |
11 |
| - cmd: >- |
12 |
| - /usr/local/libexec/mysqld --version | |
13 |
| - python3 -c |
14 |
| - 'import sys, re; print(re.search("Ver[\s\t]*([0-9]+\.[0-9]+)", sys.stdin.readline()).group(1))' |
15 |
| - changed_when: no |
16 |
| - register: mariadb_get_server_version_result |
| 5 | + - name: Get MariaDB server version |
| 6 | + check_mode: no |
| 7 | + ansible.builtin.shell: |
| 8 | + cmd: >- |
| 9 | + /usr/local/libexec/mysqld --version | |
| 10 | + python3 -c |
| 11 | + 'import sys, re; print(re.search("Ver[\s\t]*([0-9]+\.[0-9]+)", sys.stdin.readline()).group(1))' |
| 12 | + changed_when: no |
| 13 | + register: mariadb_get_server_version_result |
17 | 14 |
|
18 |
| - - name: Check if legacy config location must be used |
19 |
| - ansible.builtin.set_fact: |
20 |
| - mariadb_use_legacy_config_location_result: "{{ mariadb_get_server_version_result.stdout is version('10.5', '<') }}" |
| 15 | + - name: Check if legacy config location must be used |
| 16 | + ansible.builtin.set_fact: |
| 17 | + mariadb_use_legacy_config_location_result: "{{ mariadb_get_server_version_result.stdout is version('10.5', '<') }}" |
21 | 18 |
|
22 |
| - - name: Remove obsolete my.cnf |
23 |
| - when: not mariadb_use_legacy_config_location_result |
24 |
| - ansible.builtin.file: |
25 |
| - path: "/usr/local/etc/my.cnf" |
26 |
| - state: absent |
| 19 | + - name: Remove obsolete my.cnf |
| 20 | + when: not mariadb_use_legacy_config_location_result |
| 21 | + ansible.builtin.file: |
| 22 | + path: "/usr/local/etc/my.cnf" |
| 23 | + state: absent |
27 | 24 |
|
| 25 | +- name: Handle MariaDB nodes |
| 26 | + when: not mariadb.galera.arbitrator |
| 27 | + block: |
28 | 28 | - name: Configure MariaDB (my.cnf)
|
29 | 29 | community.general.ini_file:
|
30 | 30 | path: "{{ config_filepath }}"
|
|
0 commit comments