mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-27 12:51:26 -07:00
Draft: Add a mariadb container
This commit is contained in:
parent
4dac66382a
commit
86188a20aa
4 changed files with 62 additions and 58 deletions
4
Makefile
Normal file
4
Makefile
Normal file
|
@ -0,0 +1,4 @@
|
|||
.PHONY: test-integration-ansible-2-11-python-3-8-mariadb-10-5
|
||||
test-integration-ansible-2-11-python-3-8-mariadb-10-5:
|
||||
podman run --detach --name mariadb105 --env MARIADB_ROOT_PASSWORD=msandbox --publish 3307:3306 mariadb:10.5
|
||||
ansible-test integration --docker --python 3.8 test_mysql_user
|
|
@ -1,36 +1,36 @@
|
|||
---
|
||||
- name: "{{ role_name }} | install | add apt signing key for percona"
|
||||
apt_key:
|
||||
keyserver: keyserver.ubuntu.com
|
||||
id: 4D1BB29D63D98E422B2113B19334A25F8507EFA5
|
||||
state: present
|
||||
when: install_type == 'mysql'
|
||||
# - name: "{{ role_name }} | install | add apt signing key for percona"
|
||||
# apt_key:
|
||||
# keyserver: keyserver.ubuntu.com
|
||||
# id: 4D1BB29D63D98E422B2113B19334A25F8507EFA5
|
||||
# state: present
|
||||
# when: install_type == 'mysql'
|
||||
|
||||
- name: "{{ role_name }} | install | add percona repositories"
|
||||
apt_repository:
|
||||
repo: deb http://repo.percona.com/percona/apt {{ ansible_lsb.codename }} main
|
||||
state: present
|
||||
when: install_type == 'mysql'
|
||||
# - name: "{{ role_name }} | install | add percona repositories"
|
||||
# apt_repository:
|
||||
# repo: deb http://repo.percona.com/percona/apt {{ ansible_lsb.codename }} main
|
||||
# state: present
|
||||
# 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 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 | 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:
|
||||
name: "{{ percona_mysql_packages }}"
|
||||
state: present
|
||||
environment:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
# - name: "{{ role_name }} | install | install packages required by percona"
|
||||
# apt:
|
||||
# name: "{{ percona_mysql_packages }}"
|
||||
# state: present
|
||||
# environment:
|
||||
# DEBIAN_FRONTEND: noninteractive
|
||||
|
||||
- name: "{{ role_name }} | install | install packages required by mysql connector"
|
||||
apt:
|
||||
|
@ -60,31 +60,31 @@
|
|||
debug:
|
||||
msg: '{{ connector_ver }}'
|
||||
|
||||
- name: "{{ role_name }} | install | install packages required by mysql"
|
||||
apt:
|
||||
name: "{{ install_prereqs }}"
|
||||
state: present
|
||||
environment:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
# - name: "{{ role_name }} | install | install packages required by mysql"
|
||||
# apt:
|
||||
# name: "{{ install_prereqs }}"
|
||||
# state: present
|
||||
# environment:
|
||||
# DEBIAN_FRONTEND: noninteractive
|
||||
|
||||
- name: "{{ role_name }} | install | download and unpack dbdeployer"
|
||||
unarchive:
|
||||
remote_src: true
|
||||
src: "{{ dbdeployer_src }}"
|
||||
dest: "{{ dbdeployer_install_dir }}"
|
||||
creates: "{{ dbdeployer_installed_file }}"
|
||||
register: dbdeployer_tarball_install
|
||||
notify:
|
||||
- create zookeeper installed file
|
||||
until: dbdeployer_tarball_install is not failed
|
||||
retries: 6
|
||||
delay: 5
|
||||
# - name: "{{ role_name }} | install | download and unpack dbdeployer"
|
||||
# unarchive:
|
||||
# remote_src: true
|
||||
# src: "{{ dbdeployer_src }}"
|
||||
# dest: "{{ dbdeployer_install_dir }}"
|
||||
# creates: "{{ dbdeployer_installed_file }}"
|
||||
# register: dbdeployer_tarball_install
|
||||
# notify:
|
||||
# - create zookeeper installed file
|
||||
# until: dbdeployer_tarball_install is not failed
|
||||
# retries: 6
|
||||
# delay: 5
|
||||
|
||||
- name: "{{ role_name }} | install | create symlink"
|
||||
file:
|
||||
src: "{{ dbdeployer_install_dir }}/dbdeployer-{{ dbdeployer_version }}.linux"
|
||||
dest: /usr/local/bin/dbdeployer
|
||||
follow: false
|
||||
state: link
|
||||
# - name: "{{ role_name }} | install | create symlink"
|
||||
# file:
|
||||
# src: "{{ dbdeployer_install_dir }}/dbdeployer-{{ dbdeployer_version }}.linux"
|
||||
# dest: /usr/local/bin/dbdeployer
|
||||
# follow: false
|
||||
# state: link
|
||||
|
||||
- meta: flush_handlers
|
||||
# - meta: flush_handlers
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
# and should not be used as examples of how to write Ansible roles #
|
||||
####################################################################
|
||||
|
||||
- import_tasks: setvars.yml
|
||||
- import_tasks: dir.yml
|
||||
# - import_tasks: setvars.yml
|
||||
# - import_tasks: dir.yml
|
||||
- import_tasks: install.yml
|
||||
- import_tasks: config.yml
|
||||
- import_tasks: verify.yml
|
||||
# - import_tasks: config.yml
|
||||
# - import_tasks: verify.yml
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
mysql_parameters: &mysql_params
|
||||
login_user: '{{ mysql_user }}'
|
||||
login_password: '{{ mysql_password }}'
|
||||
login_host: 127.0.0.1
|
||||
login_host: 192.168.1.108
|
||||
login_port: '{{ mysql_primary_port }}'
|
||||
|
||||
block:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue