From 4a837149ae2c3f9417029f5e96011874e545b876 Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Wed, 1 Oct 2014 17:20:27 -0500 Subject: [PATCH] converted galera to use repo_packages --- .../infrastructure/galera-config.yml | 1 + .../roles/galera_client_cnf/tasks/main.yml | 12 ++++---- .../roles/galera_config/tasks/main.yml | 18 +++++------ .../roles/galera_db_setup/tasks/main.yml | 30 +++++++++---------- .../roles/galera_post_config/tasks/main.yml | 14 ++++----- 5 files changed, 38 insertions(+), 37 deletions(-) diff --git a/rpc_deployment/playbooks/infrastructure/galera-config.yml b/rpc_deployment/playbooks/infrastructure/galera-config.yml index 89785512f6..f4df6eb8b0 100644 --- a/rpc_deployment/playbooks/infrastructure/galera-config.yml +++ b/rpc_deployment/playbooks/infrastructure/galera-config.yml @@ -24,4 +24,5 @@ - galera_client_cnf - galera_config vars_files: + - vars/repo_packages/galera.yml - vars/config_vars/container_config_galera.yml diff --git a/rpc_deployment/roles/galera_client_cnf/tasks/main.yml b/rpc_deployment/roles/galera_client_cnf/tasks/main.yml index c3f1a3c1da..d93f817eb2 100644 --- a/rpc_deployment/roles/galera_client_cnf/tasks/main.yml +++ b/rpc_deployment/roles/galera_client_cnf/tasks/main.yml @@ -14,9 +14,9 @@ # limitations under the License. - name: Drop local .my.cnf file - template: > - src=client_my.cnf - dest=/root/.my.cnf - owner=root - group=root - mode=0600 + template: + src: "client_my.cnf" + dest: "/root/.my.cnf" + owner: "root" + group: "root" + mode: "0600" diff --git a/rpc_deployment/roles/galera_config/tasks/main.yml b/rpc_deployment/roles/galera_config/tasks/main.yml index 4ae65361bc..425e97b6dd 100644 --- a/rpc_deployment/roles/galera_config/tasks/main.yml +++ b/rpc_deployment/roles/galera_config/tasks/main.yml @@ -14,19 +14,19 @@ # limitations under the License. - name: Create the local directories - file: > - path={{ item }} - state=directory - group=root - owner=root - recurse=true + file: + path: "{{ item }}" + state: "directory" + group: "root" + owner: "root" + recurse: "true" with_items: - /etc/mysql/conf.d - name: Drop mariadb configs - template: > - src={{ item.src }} - dest={{ item.dest }} + template: + src: "{{ item.src }}" + dest: "{{ item.dest }}" register: mariadb_config with_items: - { src: my.cnf, dest: /etc/mysql/my.cnf } diff --git a/rpc_deployment/roles/galera_db_setup/tasks/main.yml b/rpc_deployment/roles/galera_db_setup/tasks/main.yml index 6bec7eb8c5..e61714f187 100644 --- a/rpc_deployment/roles/galera_db_setup/tasks/main.yml +++ b/rpc_deployment/roles/galera_db_setup/tasks/main.yml @@ -14,23 +14,23 @@ # limitations under the License. - name: Create DB for service - mysql_db: > - login_user="{{ mysql_user }}" - login_password="{{ mysql_password }}" - login_host="{{ mysql_address }}" - name="{{ container_database }}" - state=present + mysql_db: + login_user: "{{ mysql_user }}" + login_password: "{{ mysql_password }}" + login_host: "{{ mysql_address }}" + name: "{{ container_database }}" + state: "present" - name: Grant access to the DB for the service - mysql_user: > - login_user="{{ mysql_user }}" - login_password="{{ mysql_password }}" - login_host="{{ mysql_address }}" - name="{{ container_mysql_user }}" - password="{{ container_mysql_password }}" - host="{{ item }}" - state=present - priv={{ container_database }}.*:ALL + mysql_user: + login_user: "{{ mysql_user }}" + login_password: "{{ mysql_password }}" + login_host: "{{ mysql_address }}" + name: "{{ container_mysql_user }}" + password: "{{ container_mysql_password }}" + host: "{{ item }}" + state: "present" + priv: "{{ container_database }}.*:ALL" with_items: - "localhost" - "%" diff --git a/rpc_deployment/roles/galera_post_config/tasks/main.yml b/rpc_deployment/roles/galera_post_config/tasks/main.yml index 160d732ef7..a076c3fafd 100644 --- a/rpc_deployment/roles/galera_post_config/tasks/main.yml +++ b/rpc_deployment/roles/galera_post_config/tasks/main.yml @@ -14,12 +14,12 @@ # limitations under the License. - name: Ensure permissions on Log dir make it readable by syslog - file: > - path={{ item.path }} - state=directory - group={{ item.owner }} - owner={{ item.owner }} - mode=0755 - recurse=true + file: + path: "{{ item.path }}" + state: "directory" + group: "{{ item.owner }}" + owner: "{{ item.owner }}" + mode: "0755" + recurse: "true" with_items: - { path: '/var/log/mysql/', owner: 'mysql' }