579550d32d
Ansible 2.4+ complains that 'include' statements are deprecated in favor of 'import_tasks' and 'include_tasks' so replace all of them. Change-Id: Ib65187c1239482bfd823b2f3dfd437aa7a709ccd
51 lines
1.5 KiB
YAML
51 lines
1.5 KiB
YAML
---
|
|
# Copyright 2015, Rackspace US, Inc., Mirantis Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
- name: Create ssl directory
|
|
file:
|
|
path: "/etc/mysql/ssl"
|
|
state: "directory"
|
|
owner: "mysql"
|
|
group: "mysql"
|
|
mode: "0750"
|
|
|
|
- include_tasks: galera_ssl_self_signed.yml
|
|
static: no
|
|
when:
|
|
- not galera_user_ssl_cert is defined
|
|
- not galera_user_ssl_key is defined
|
|
- not galera_user_ssl_ca_cert is defined
|
|
|
|
- name: Copy CA cert and key (USER)
|
|
copy:
|
|
src: "{{ item.src }}"
|
|
dest: "{{ item.dest }}"
|
|
owner: "mysql"
|
|
group: "mysql"
|
|
mode: "{{ item.mode | default('0640') }}"
|
|
with_items:
|
|
- src: "{{ galera_user_ssl_ca_cert }}"
|
|
dest: "{{ galera_ssl_ca_cert }}"
|
|
- src: "{{ galera_user_ssl_cert }}"
|
|
dest: "{{ galera_ssl_cert }}"
|
|
- src: "{{ galera_user_ssl_key }}"
|
|
dest: "{{ galera_ssl_key }}"
|
|
mode: "0600"
|
|
when:
|
|
- galera_user_ssl_cert is defined
|
|
- galera_user_ssl_key is defined
|
|
- galera_user_ssl_ca_cert is defined
|
|
notify: Restart all mysql
|