All variables prexied with "mysql_"

pull/14/head
Emilien Mantel 2017-06-01 15:33:09 +02:00
parent 9c0455afe2
commit 25fa21021d
9 changed files with 20 additions and 20 deletions

View File

@ -52,10 +52,10 @@ Check "priv" syntax in [mysql\_user module documentation](http://docs.ansible.co
### Packaging
- `mariadb_version`: 10.0 / 10.1 / 10.2
- `mariadb_repository`: MariaDB upstream APT repository (see: [MariaDB repositories tool](http://mariadb.org/mariadb/repositories/))
- `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_mariadb_version`: 10.0 / 10.1 / 10.2
- `mysql_mariadb_repository`: MariaDB upstream APT repository (see: [MariaDB repositories tool](http://mariadb.org/mariadb/repositories/))
- `mysql_percona_version`: 5.5 / 5.6 / 5.7
- `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
------------

View File

@ -124,18 +124,18 @@ mysql_users: []
# -------------------------------------
# MariaDB
# -------------------------------------
mariadb_version: '10.1'
mysql_mariadb_version: '10.1'
# 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_version: '5.6'
percona_repository: 'http://repo.percona.com/apt'
mysql_percona_version: '5.6'
mysql_percona_repository: 'http://repo.percona.com/apt'
# Galera
mysql_galera_resetup: false
mariadb_galera_members: []
mysql_galera_members: []
mysql_galera_primary_node: 'change_me' # See: https://github.com/ansible/ansible/issues/17453

View File

@ -4,10 +4,10 @@
apt_key: keyserver="keyserver.ubuntu.com" id="0xcbcb082a1bb943db" state=present
- 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
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
- name: INCLUDE | Normal Install

View File

@ -7,9 +7,9 @@
template: src=etc/apt/preferences.d/95-percona.j2 dest=/etc/apt/preferences.d/95-percona
- 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
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

View File

@ -4,13 +4,13 @@
include: apt.yml
- 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
- 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
- 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

View File

@ -11,7 +11,7 @@
# Global
wsrep_on=ON
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
wsrep_sst_method=rsync
# TODO: wsrep_cluster_name="my_wsrep_cluster"

View File

@ -1,5 +1,5 @@
mysql_vendor: 'mariadb_galera'
mariadb_galera_members:
mysql_galera_members:
- '192.168.200.18'
- '192.168.200.19'
- '192.168.200.20'

View File

@ -41,7 +41,7 @@
vars:
mysql_galera_primary_node: 'jessie-upstream-mariadbgalera-1'
mysql_wsrep_node_address: "{{ ansible_eth1.ipv4.address }}"
mariadb_version: '10.1'
mysql_mariadb_version: '10.1'
roles:
- ../../

View File

@ -4,7 +4,7 @@
vars:
mysql_replication_master: true
mysql_bind_address: '{{ ansible_eth0.ipv4.address }}'
mariadb_galera_members:
mysql_galera_members:
- '{{ ansible_eth0.ipv4.address }}'
mysql_galera_primary_node: 'localhost'
roles: