mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-07-28 07:31:24 -07:00
Backport/stable 1/pr 452 (#464)
* Sync GHA workflow w/ the collection template (#452) * Sync GHA workflow w/ the collection template * Drop the trailing pre-cmd semicolon * Recover missing `-e` flag of `sed` * Use relative paths for version configs * Unquote `env.connector_version_file` * Use string formatting to fix the substitution problem (cherry picked from commit8107530744
) (cherry picked from commit704a0cea6a
) * Backport mysql_version_parts variable assignation (cherry picked from commit79046a88cb
) (cherry picked from commita59d95501e
) * Add changelog fragment (cherry picked from commit26ecd68801
) * Backport flags and variables to differentiate MariaDB from MySQL setup (cherry picked from commitb4303511d5
) * Backport issue-28 check for tls support (cherry picked from commitefde607d25
) * Backport tls_requirements simplified and deduplified tests (cherry picked from commitac5a339644
) Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
This commit is contained in:
parent
fadbd30572
commit
85a63511b6
16 changed files with 146 additions and 117 deletions
|
@ -3,11 +3,16 @@ dbdeployer_home_dir: /opt/dbdeployer
|
|||
|
||||
home_dir: /root
|
||||
|
||||
percona_client_version: 5.7
|
||||
|
||||
mariadb_install: false
|
||||
|
||||
mysql_version: 8.0.22
|
||||
mariadb_version: 10.5.4
|
||||
|
||||
mysql_base_port: 3306
|
||||
|
||||
percona_client_package: >-
|
||||
{%- if mariadb_install -%}
|
||||
mariadb-client
|
||||
{%- else -%}
|
||||
percona-server-client-5.7
|
||||
{%- endif -%}
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
|
||||
- name: "{{ role_name }} | config | run unpack tarball"
|
||||
shell:
|
||||
cmd: "dbdeployer unpack {{ dbdeployer_sandbox_download_dir }}/{{ install_tarball }}"
|
||||
cmd: "dbdeployer unpack {{ dbdeployer_sandbox_download_dir }}/{{ install_tarball }} --flavor {{ install_type }}"
|
||||
creates: "{{ dbdeployer_sandbox_binary_dir }}/{{ install_version }}"
|
||||
|
||||
- name: "{{ role_name }} | config | setup replication topology"
|
||||
shell:
|
||||
cmd: "dbdeployer deploy multiple {{ install_version }} --base-port {{ mysql_base_port }} --my-cnf-options=\"master_info_repository='TABLE'\" --my-cnf-options=\"relay_log_info_repository='TABLE'\""
|
||||
cmd: "dbdeployer deploy multiple {{ install_version }} --flavor {{ install_type }} --base-port {{ mysql_base_port }} --my-cnf-options=\"master_info_repository='TABLE'\" --my-cnf-options=\"relay_log_info_repository='TABLE'\""
|
||||
creates: "{{ dbdeployer_sandbox_home_dir }}/multi_msb_{{ install_version|replace('.','_') }}"
|
||||
|
|
|
@ -4,12 +4,26 @@
|
|||
keyserver: keyserver.ubuntu.com
|
||||
id: 4D1BB29D63D98E422B2113B19334A25F8507EFA5
|
||||
state: present
|
||||
when: install_type == 'mysql'
|
||||
|
||||
- name: "{{ role_name }} | install | add percona repositories"
|
||||
apt_repository:
|
||||
repo: "{{ item }}"
|
||||
repo: deb http://repo.percona.com/percona/apt {{ ansible_lsb.codename }} main
|
||||
state: present
|
||||
loop: "{{ percona_mysql_repos }}"
|
||||
when: install_type == 'mysql'
|
||||
|
||||
- name: "{{ role_name }} | install | add apt signing key for mariadb"
|
||||
apt_key:
|
||||
keyserver: keyserver.ubuntu.com
|
||||
id: F1656F24C74CD1D8
|
||||
state: present
|
||||
when: install_type == 'mariadb'
|
||||
|
||||
- name: "{{ role_name }} | install | add mariadb repositories"
|
||||
apt_repository:
|
||||
repo: "deb [arch=amd64,arm64] https://downloads.mariadb.com/MariaDB/mariadb-{{ mysql_major_version }}/repo/ubuntu {{ ansible_lsb.codename }} main"
|
||||
state: present
|
||||
when: install_type == 'mariadb'
|
||||
|
||||
- name: "{{ role_name }} | install | install packages required by percona"
|
||||
apt:
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
---
|
||||
- name: "{{ role_name }} | setvars | split mysql version in parts"
|
||||
set_fact:
|
||||
mysql_version_parts: "{{ mysql_version.split('.') }}"
|
||||
mysql_version_parts: >-
|
||||
{%- if mariadb_install -%}
|
||||
{{ mariadb_version.split('.') }}
|
||||
{%- else -%}
|
||||
{{ mysql_version.split('.') }}
|
||||
{%- endif -%}
|
||||
|
||||
- name: "{{ role_name }} | setvars | get mysql major version"
|
||||
set_fact:
|
||||
|
|
|
@ -7,12 +7,8 @@ dbdeployer_sandbox_download_dir: "{{ home_dir }}/downloads"
|
|||
dbdeployer_sandbox_binary_dir: "{{ home_dir }}/opt/mysql"
|
||||
dbdeployer_sandbox_home_dir: "{{ home_dir }}/sandboxes"
|
||||
|
||||
percona_mysql_repos:
|
||||
- deb http://repo.percona.com/apt {{ ansible_lsb.codename }} main
|
||||
- deb-src http://repo.percona.com/apt {{ ansible_lsb.codename }} main
|
||||
|
||||
percona_mysql_packages:
|
||||
- percona-server-client-{{ percona_client_version }}
|
||||
- "{{ percona_client_package }}"
|
||||
|
||||
python_packages: [pymysql == 0.9.3]
|
||||
|
||||
|
@ -29,5 +25,6 @@ install_python_prereqs:
|
|||
|
||||
mysql_tarball: "mysql-{{ mysql_version }}-linux-glibc2.12-x86_64.tar.{{ mysql_compression_extension }}"
|
||||
mysql_src: "https://dev.mysql.com/get/Downloads/MySQL-{{ mysql_major_version }}/{{ mysql_tarball }}"
|
||||
mariadb_tarball: "mariadb-{{ mariadb_version }}-linux-x86_64.tar.gz"
|
||||
mariadb_src: "https://downloads.mariadb.com/MariaDB/mariadb-{{ mariadb_version }}/bintar-linux-x86_64/{{ mariadb_tarball }}"
|
||||
mariadb_url_subdir: "linux"
|
||||
mariadb_tarball: "mariadb-{{ mariadb_version }}-{{ mariadb_url_subdir }}-x86_64.tar.gz"
|
||||
mariadb_src: "https://downloads.mariadb.com/MariaDB/mariadb-{{ mariadb_version }}/bintar-{{ mariadb_url_subdir }}-x86_64/{{ mariadb_tarball }}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue