Skip to content
Snippets Groups Projects
Commit d325211c authored by Chris Croome's avatar Chris Croome
Browse files

Update for Ansible 2.13

parent f4b1cd46
No related branches found
No related tags found
No related merge requests found
Pipeline #23103 passed
......@@ -31,7 +31,7 @@ See also the [defaults/main.yml](defaults/main.yml) file.
| `mariadb_socket` | `/var/run/mysqld/mysqld.sock` | The path to the MariaDB scoket |
| `mariadb_mysqltuner` | `true` | Install [MySQLTuner](https://github.com/major/MySQLTuner-perl) |
| `mariadb_mysqltuner_version` | `latest` | Set `latest` or a version from [the releases page](https://github.com/major/MySQLTuner-perl/releases), eg `v1.9.9` |
| `mariadb_sys_schema` | `true` | If `mariadb_sys_schema` is true then the sys schema is imported from [this repo](https://github.com/webarch-coop/mariadb-sys) |
| `mariadb_sys_schema` | `false` | If `mariadb_sys_schema` is true then the sys schema is imported from [this repo](https://github.com/webarch-coop/mariadb-sys) |
| `mariadb_time_zone_import` | `true` | If `mariadb_time_zone_import` is true then the time zone tables when they have been updated |
| `mariadb_systemd_no_new_privileges` | `true` | Set systemd `NoNewPrivileges` to true for MariaDB |
| `mariadb_systemd_private_network` | `true` | Set systemd `PrivateNetwork` to true for MariaDB |
......
......@@ -28,10 +28,23 @@
verbosity: 2
# Skip lost+found as it will be a result of /var/lib/mysql being a seperate partition
- name: Set a variable for the MariaDB databases
- name: Set a variable for the MariaDB databases for Ansible < 2.13
ansible.builtin.set_fact:
mariadb_databases: "{{ mariadb_databases | default([]) }} + [ '{{ db.key }}' ]"
when: db.key != "lost+found"
when:
- ansible_version.full is version('2.13.0', '<')
- db.key != "lost+found"
loop: "{{ mariadb_info.databases | dict2items }}"
loop_control:
loop_var: db
label: "{{ db.key }}"
- name: Set a variable for the MariaDB databases for Ansible >= 2.13
ansible.builtin.set_fact:
mariadb_databases: "{{ mariadb_databases | default([]) + [ db.key ] }}"
when:
- ansible_version.full is version('2.13.0', '>=')
- db.key != "lost+found"
loop: "{{ mariadb_info.databases | dict2items }}"
loop_control:
loop_var: db
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment