converted galera to use repo_packages
This commit is contained in:
parent
b41fc58920
commit
4a837149ae
@ -24,4 +24,5 @@
|
|||||||
- galera_client_cnf
|
- galera_client_cnf
|
||||||
- galera_config
|
- galera_config
|
||||||
vars_files:
|
vars_files:
|
||||||
|
- vars/repo_packages/galera.yml
|
||||||
- vars/config_vars/container_config_galera.yml
|
- vars/config_vars/container_config_galera.yml
|
||||||
|
@ -14,9 +14,9 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Drop local .my.cnf file
|
- name: Drop local .my.cnf file
|
||||||
template: >
|
template:
|
||||||
src=client_my.cnf
|
src: "client_my.cnf"
|
||||||
dest=/root/.my.cnf
|
dest: "/root/.my.cnf"
|
||||||
owner=root
|
owner: "root"
|
||||||
group=root
|
group: "root"
|
||||||
mode=0600
|
mode: "0600"
|
||||||
|
@ -14,19 +14,19 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Create the local directories
|
- name: Create the local directories
|
||||||
file: >
|
file:
|
||||||
path={{ item }}
|
path: "{{ item }}"
|
||||||
state=directory
|
state: "directory"
|
||||||
group=root
|
group: "root"
|
||||||
owner=root
|
owner: "root"
|
||||||
recurse=true
|
recurse: "true"
|
||||||
with_items:
|
with_items:
|
||||||
- /etc/mysql/conf.d
|
- /etc/mysql/conf.d
|
||||||
|
|
||||||
- name: Drop mariadb configs
|
- name: Drop mariadb configs
|
||||||
template: >
|
template:
|
||||||
src={{ item.src }}
|
src: "{{ item.src }}"
|
||||||
dest={{ item.dest }}
|
dest: "{{ item.dest }}"
|
||||||
register: mariadb_config
|
register: mariadb_config
|
||||||
with_items:
|
with_items:
|
||||||
- { src: my.cnf, dest: /etc/mysql/my.cnf }
|
- { src: my.cnf, dest: /etc/mysql/my.cnf }
|
||||||
|
@ -14,23 +14,23 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Create DB for service
|
- name: Create DB for service
|
||||||
mysql_db: >
|
mysql_db:
|
||||||
login_user="{{ mysql_user }}"
|
login_user: "{{ mysql_user }}"
|
||||||
login_password="{{ mysql_password }}"
|
login_password: "{{ mysql_password }}"
|
||||||
login_host="{{ mysql_address }}"
|
login_host: "{{ mysql_address }}"
|
||||||
name="{{ container_database }}"
|
name: "{{ container_database }}"
|
||||||
state=present
|
state: "present"
|
||||||
|
|
||||||
- name: Grant access to the DB for the service
|
- name: Grant access to the DB for the service
|
||||||
mysql_user: >
|
mysql_user:
|
||||||
login_user="{{ mysql_user }}"
|
login_user: "{{ mysql_user }}"
|
||||||
login_password="{{ mysql_password }}"
|
login_password: "{{ mysql_password }}"
|
||||||
login_host="{{ mysql_address }}"
|
login_host: "{{ mysql_address }}"
|
||||||
name="{{ container_mysql_user }}"
|
name: "{{ container_mysql_user }}"
|
||||||
password="{{ container_mysql_password }}"
|
password: "{{ container_mysql_password }}"
|
||||||
host="{{ item }}"
|
host: "{{ item }}"
|
||||||
state=present
|
state: "present"
|
||||||
priv={{ container_database }}.*:ALL
|
priv: "{{ container_database }}.*:ALL"
|
||||||
with_items:
|
with_items:
|
||||||
- "localhost"
|
- "localhost"
|
||||||
- "%"
|
- "%"
|
||||||
|
@ -14,12 +14,12 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Ensure permissions on Log dir make it readable by syslog
|
- name: Ensure permissions on Log dir make it readable by syslog
|
||||||
file: >
|
file:
|
||||||
path={{ item.path }}
|
path: "{{ item.path }}"
|
||||||
state=directory
|
state: "directory"
|
||||||
group={{ item.owner }}
|
group: "{{ item.owner }}"
|
||||||
owner={{ item.owner }}
|
owner: "{{ item.owner }}"
|
||||||
mode=0755
|
mode: "0755"
|
||||||
recurse=true
|
recurse: "true"
|
||||||
with_items:
|
with_items:
|
||||||
- { path: '/var/log/mysql/', owner: 'mysql' }
|
- { path: '/var/log/mysql/', owner: 'mysql' }
|
||||||
|
Loading…
Reference in New Issue
Block a user