ansible-role-gear/tasks/config.yaml
Paul Belanger e75294e6b1
Add support to manage SSL cert
Since gear support SSL certs, add in some support to place them into
the SSL folder.  It is possible we might want to move this into an
ansible role, but for now it seems minimal to support it.

Change-Id: I3e4c83c962f550b8cb6aef11a2a9b42288b3f1da
Depends-On: https://review.openstack.org/557428
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-03-29 19:25:03 -04:00

56 lines
1.7 KiB
YAML

# Copyright 2017 Red Hat, 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 required directories.
become: yes
file:
group: "{{ gear_user_group }}"
owner: "{{ gear_user_name }}"
path: "{{ item }}"
state: directory
with_items:
- /etc/gear
- /etc/gear/ssl
- /var/log/gear
- name: Install gear ssl ca configuration.
become: yes
template:
dest: "{{ gear_file_ssl_ca_dest }}"
group: "{{ gear_file_ssl_ca_group }}"
mode: "{{ gear_file_ssl_ca_mode }}"
owner: "{{ gear_file_ssl_ca_owner }}"
src: "{{ gear_file_ssl_ca_src }}"
register: gear_file_ssl_ca
- name: Install gear ssl cert configuration.
become: yes
template:
dest: "{{ gear_file_ssl_cert_dest }}"
group: "{{ gear_file_ssl_cert_group }}"
mode: "{{ gear_file_ssl_cert_mode }}"
owner: "{{ gear_file_ssl_cert_owner }}"
src: "{{ gear_file_ssl_cert_src }}"
register: gear_file_ssl_cert
- name: Install gear ssl key configuration.
become: yes
template:
dest: "{{ gear_file_ssl_key_dest }}"
group: "{{ gear_file_ssl_key_group }}"
mode: "{{ gear_file_ssl_key_mode }}"
owner: "{{ gear_file_ssl_key_owner }}"
src: "{{ gear_file_ssl_key_src }}"
register: gear_file_ssl_key