33 lines
941 B
YAML
33 lines
941 B
YAML
---
|
|
|
|
- name: APT | Install GPG
|
|
ansible.builtin.apt:
|
|
name: gpg
|
|
|
|
- name: COMMAND | Check expected mariadb version
|
|
ansible.builtin.command: 'grep -q "{{ mariadb_upstream_version }}" /etc/apt/sources.list.d/mariadb.list'
|
|
register: check_version
|
|
failed_when: false
|
|
changed_when: false
|
|
|
|
- name: APT | Add MariaDB upstream repository
|
|
when: check_version.rc > 0
|
|
block:
|
|
|
|
- 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
|
|
|
|
- name: COMMAND | Launch MariaDB upstream setup script
|
|
ansible.builtin.command: '/tmp/mariadb_repo_setup --mariadb-server-version={{ mariadb_upstream_version }}'
|
|
changed_when: true
|
|
|
|
- name: FILE | Remove setup script
|
|
ansible.builtin.file:
|
|
path: '/tmp/mariadb_repo_setup'
|
|
state: absent
|