2015-07-12 16:50:23 +07:00
|
|
|
---
|
|
|
|
|
2021-09-02 23:17:54 +07:00
|
|
|
- name: APT | Install GPG
|
|
|
|
ansible.builtin.apt:
|
|
|
|
name: gpg
|
|
|
|
|
2024-08-26 15:12:09 +07:00
|
|
|
- name: COMMAND | Check expected mariadb version
|
2022-02-28 17:34:39 +07:00
|
|
|
ansible.builtin.command: 'grep -q "{{ mariadb_upstream_version }}" /etc/apt/sources.list.d/mariadb.list'
|
2024-08-26 15:12:09 +07:00
|
|
|
register: check_version
|
2022-02-28 16:11:30 +07:00
|
|
|
failed_when: false
|
|
|
|
changed_when: false
|
2015-07-12 16:50:23 +07:00
|
|
|
|
2024-08-26 15:12:09 +07:00
|
|
|
- name: APT | Add MariaDB upstream repository
|
|
|
|
when: check_version.rc > 0
|
|
|
|
block:
|
2017-07-03 20:24:01 +07:00
|
|
|
|
2022-02-28 16:11:30 +07:00
|
|
|
- name: GET_URL | Download MariaDB setup script
|
|
|
|
ansible.builtin.get_url:
|
|
|
|
url: '{{ mariadb_upstream_setup_script }}'
|
|
|
|
dest: '/tmp/mariadb_repo_setup'
|
|
|
|
mode: 0755
|
|
|
|
owner: root
|
|
|
|
group: root
|
2015-07-12 16:50:23 +07:00
|
|
|
|
2022-02-28 16:11:30 +07:00
|
|
|
- name: COMMAND | Launch MariaDB upstream setup script
|
|
|
|
ansible.builtin.command: '/tmp/mariadb_repo_setup --mariadb-server-version={{ mariadb_upstream_version }}'
|
2022-02-28 16:59:46 +07:00
|
|
|
changed_when: true
|
|
|
|
|
|
|
|
- name: FILE | Remove setup script
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: '/tmp/mariadb_repo_setup'
|
|
|
|
state: absent
|