36 lines
1.0 KiB
YAML
36 lines
1.0 KiB
YAML
---
|
|
- name: Install mariadb repo necessary packages
|
|
ansible.builtin.apt:
|
|
package:
|
|
- apt-transport-https
|
|
- gnupg2
|
|
state: present
|
|
update_cache: true
|
|
when: mariadb_use_official_repo
|
|
|
|
- name: Install mariadb repository key
|
|
ansible.builtin.get_url:
|
|
url: "https://mariadb.org/mariadb_release_signing_key.asc"
|
|
dest: "/etc/apt/trusted.gpg.d/mariadb.asc"
|
|
# //TEMP todo
|
|
# checksum: sha256:http://example.com/path/sha256sum.txt
|
|
owner: root
|
|
group: root
|
|
mode: "0644"
|
|
when: mariadb_use_official_repo
|
|
|
|
- name: Setup mariadb repository sourcelist entry
|
|
ansible.builtin.copy:
|
|
dest: /etc/apt/sources.list.d/mariadb.list
|
|
content: |
|
|
deb {{ mariadb_use_official_repo_url }}/{{ mariadb_use_official_repo_version }}/{{ ansible_distribution | lower() }} {{ ansible_distribution_release }} main
|
|
when: mariadb_use_official_repo
|
|
|
|
- name: Install packages
|
|
ansible.builtin.apt:
|
|
package:
|
|
- mariadb-server
|
|
- python3-pymysql
|
|
state: present
|
|
update_cache: true
|