All variables prexied with "mysql_"
parent
9c0455afe2
commit
25fa21021d
|
@ -52,10 +52,10 @@ Check "priv" syntax in [mysql\_user module documentation](http://docs.ansible.co
|
||||||
|
|
||||||
### Packaging
|
### Packaging
|
||||||
|
|
||||||
- `mariadb_version`: 10.0 / 10.1 / 10.2
|
- `mysql_mariadb_version`: 10.0 / 10.1 / 10.2
|
||||||
- `mariadb_repository`: MariaDB upstream APT repository (see: [MariaDB repositories tool](http://mariadb.org/mariadb/repositories/))
|
- `mysql_mariadb_repository`: MariaDB upstream APT repository (see: [MariaDB repositories tool](http://mariadb.org/mariadb/repositories/))
|
||||||
- `percona_version`: 5.5 / 5.6 / 5.7
|
- `mysql_percona_version`: 5.5 / 5.6 / 5.7
|
||||||
- `percona_repository`: Percona upstream APT repository (see: [Percona APT doc](http://www.percona.com/doc/percona-server/5.5/installation/apt_repo.html))
|
- `mysql_percona_repository`: Percona upstream APT repository (see: [Percona APT doc](http://www.percona.com/doc/percona-server/5.5/installation/apt_repo.html))
|
||||||
|
|
||||||
Dependencies
|
Dependencies
|
||||||
------------
|
------------
|
||||||
|
|
|
@ -124,18 +124,18 @@ mysql_users: []
|
||||||
# -------------------------------------
|
# -------------------------------------
|
||||||
# MariaDB
|
# MariaDB
|
||||||
# -------------------------------------
|
# -------------------------------------
|
||||||
mariadb_version: '10.1'
|
mysql_mariadb_version: '10.1'
|
||||||
# See: http://mariadb.org/mariadb/repositories/
|
# See: http://mariadb.org/mariadb/repositories/
|
||||||
mariadb_repository: "http://ftp.igh.cnrs.fr/pub/mariadb/repo/{{ mariadb_version }}/debian"
|
mysql_mariadb_repository: "http://ftp.igh.cnrs.fr/pub/mariadb/repo/{{ mysql_mariadb_version }}/debian"
|
||||||
|
|
||||||
# -------------------------------------
|
# -------------------------------------
|
||||||
# Percona
|
# Percona
|
||||||
# -------------------------------------
|
# -------------------------------------
|
||||||
percona_version: '5.6'
|
mysql_percona_version: '5.6'
|
||||||
percona_repository: 'http://repo.percona.com/apt'
|
mysql_percona_repository: 'http://repo.percona.com/apt'
|
||||||
|
|
||||||
|
|
||||||
# Galera
|
# Galera
|
||||||
mysql_galera_resetup: false
|
mysql_galera_resetup: false
|
||||||
mariadb_galera_members: []
|
mysql_galera_members: []
|
||||||
mysql_galera_primary_node: 'change_me' # See: https://github.com/ansible/ansible/issues/17453
|
mysql_galera_primary_node: 'change_me' # See: https://github.com/ansible/ansible/issues/17453
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
apt_key: keyserver="keyserver.ubuntu.com" id="0xcbcb082a1bb943db" state=present
|
apt_key: keyserver="keyserver.ubuntu.com" id="0xcbcb082a1bb943db" state=present
|
||||||
|
|
||||||
- name: APT | Add MariaDB repository
|
- name: APT | Add MariaDB repository
|
||||||
apt_repository: repo='deb {{ mariadb_repository }} {{ ansible_distribution_release }} main' state=present
|
apt_repository: repo='deb {{ mysql_mariadb_repository }} {{ ansible_distribution_release }} main' state=present
|
||||||
|
|
||||||
- name: APT | Add MariaDB (src) repository
|
- name: APT | Add MariaDB (src) repository
|
||||||
apt_repository: repo='deb-src {{ mariadb_repository }} {{ ansible_distribution_release }} main' state=present
|
apt_repository: repo='deb-src {{ mysql_mariadb_repository }} {{ ansible_distribution_release }} main' state=present
|
||||||
when: mysql_upstream_apt_src
|
when: mysql_upstream_apt_src
|
||||||
|
|
||||||
- name: INCLUDE | Normal Install
|
- name: INCLUDE | Normal Install
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
template: src=etc/apt/preferences.d/95-percona.j2 dest=/etc/apt/preferences.d/95-percona
|
template: src=etc/apt/preferences.d/95-percona.j2 dest=/etc/apt/preferences.d/95-percona
|
||||||
|
|
||||||
- name: APT_REPOSITORY | Add Percona repository
|
- name: APT_REPOSITORY | Add Percona repository
|
||||||
apt_repository: repo='deb {{ percona_repository }} {{ ansible_distribution_release }} main' state=present
|
apt_repository: repo='deb {{ mysql_percona_repository }} {{ ansible_distribution_release }} main' state=present
|
||||||
|
|
||||||
- name: APT_RESPOSITORY | Add Percona (src) repository
|
- name: APT_RESPOSITORY | Add Percona (src) repository
|
||||||
apt_repository: repo='deb-src {{ percona_repository }} {{ ansible_distribution_release }} main' state=present
|
apt_repository: repo='deb-src {{ mysql_percona_repository }} {{ ansible_distribution_release }} main' state=present
|
||||||
when: mysql_upstream_apt_src
|
when: mysql_upstream_apt_src
|
||||||
|
|
||||||
|
|
|
@ -4,13 +4,13 @@
|
||||||
include: apt.yml
|
include: apt.yml
|
||||||
|
|
||||||
- name: DEBCONF | Prepare MySQL silent installation (root password)
|
- name: DEBCONF | Prepare MySQL silent installation (root password)
|
||||||
debconf: name='percona-server-server-{{ percona_version }}' question='percona-server-server/root_password' vtype='password' value='{{ mysql_root_password }}'
|
debconf: name='percona-server-server-{{ mysql_percona_version }}' question='percona-server-server/root_password' vtype='password' value='{{ mysql_root_password }}'
|
||||||
when: not mysql_exists.stat.exists
|
when: not mysql_exists.stat.exists
|
||||||
|
|
||||||
- name: DEBCONF | Prepare MySQL silent installation (root password)
|
- name: DEBCONF | Prepare MySQL silent installation (root password)
|
||||||
debconf: name='percona-server-server-{{ percona_version }}' question='percona-server-server/root_password_again' vtype='password' value='{{ mysql_root_password }}'
|
debconf: name='percona-server-server-{{ mysql_percona_version }}' question='percona-server-server/root_password_again' vtype='password' value='{{ mysql_root_password }}'
|
||||||
when: not mysql_exists.stat.exists
|
when: not mysql_exists.stat.exists
|
||||||
|
|
||||||
- name: APT | Install Percona
|
- name: APT | Install Percona
|
||||||
apt: update_cache=yes cache_valid_time=3600 pkg='percona-server-server-{{ percona_version }}' state=present
|
apt: update_cache=yes cache_valid_time=3600 pkg='percona-server-server-{{ mysql_percona_version }}' state=present
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
# Global
|
# Global
|
||||||
wsrep_on=ON
|
wsrep_on=ON
|
||||||
wsrep_provider=/usr/lib/galera/libgalera_smm.so
|
wsrep_provider=/usr/lib/galera/libgalera_smm.so
|
||||||
wsrep_cluster_address=gcomm://{{ mariadb_galera_members | join(",") }}
|
wsrep_cluster_address=gcomm://{{ mysql_galera_members | join(",") }}
|
||||||
# TODO: https://mariadb.com/kb/en/mariadb/galera-cluster-system-variables/#wsrep_sst_method
|
# TODO: https://mariadb.com/kb/en/mariadb/galera-cluster-system-variables/#wsrep_sst_method
|
||||||
wsrep_sst_method=rsync
|
wsrep_sst_method=rsync
|
||||||
# TODO: wsrep_cluster_name="my_wsrep_cluster"
|
# TODO: wsrep_cluster_name="my_wsrep_cluster"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
mysql_vendor: 'mariadb_galera'
|
mysql_vendor: 'mariadb_galera'
|
||||||
mariadb_galera_members:
|
mysql_galera_members:
|
||||||
- '192.168.200.18'
|
- '192.168.200.18'
|
||||||
- '192.168.200.19'
|
- '192.168.200.19'
|
||||||
- '192.168.200.20'
|
- '192.168.200.20'
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
vars:
|
vars:
|
||||||
mysql_galera_primary_node: 'jessie-upstream-mariadbgalera-1'
|
mysql_galera_primary_node: 'jessie-upstream-mariadbgalera-1'
|
||||||
mysql_wsrep_node_address: "{{ ansible_eth1.ipv4.address }}"
|
mysql_wsrep_node_address: "{{ ansible_eth1.ipv4.address }}"
|
||||||
mariadb_version: '10.1'
|
mysql_mariadb_version: '10.1'
|
||||||
roles:
|
roles:
|
||||||
- ../../
|
- ../../
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
vars:
|
vars:
|
||||||
mysql_replication_master: true
|
mysql_replication_master: true
|
||||||
mysql_bind_address: '{{ ansible_eth0.ipv4.address }}'
|
mysql_bind_address: '{{ ansible_eth0.ipv4.address }}'
|
||||||
mariadb_galera_members:
|
mysql_galera_members:
|
||||||
- '{{ ansible_eth0.ipv4.address }}'
|
- '{{ ansible_eth0.ipv4.address }}'
|
||||||
mysql_galera_primary_node: 'localhost'
|
mysql_galera_primary_node: 'localhost'
|
||||||
roles:
|
roles:
|
||||||
|
|
Loading…
Reference in New Issue