Files
openstack-ansible-openstack…/tasks/openstack_hosts_ca_certificates.yml
Jonathan Rosser 1498d0d61d Install user supplied CA certificates into system trust store
This functionality can be used to install any CA certificates that
the deployer requires into any combination of hosts/containers.

Change-Id: Ic1292e18c8add78e8cb30f624be96292b153d4fe
2019-06-26 11:42:12 +01:00

34 lines
1.2 KiB
YAML

---
# Copyright 2019, BBC
#
# 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: Copy CA certificates
copy:
src: "{{ item.src }}"
dest: "{{ openstack_host_ca_location }}/{{ item.name }}"
register: openstack_host_ca_cert_copy
loop: "{{ openstack_host_ca_certificates | flatten(levels=1) }}"
- name: Update CA store - Ubuntu/OpenSUSE
command: update-ca-certificates
when:
- (ansible_pkg_mgr == 'apt') or (ansible_pkg_mgr == 'zypper') or (ansible_pkg_mgr == 'portage')
- openstack_host_ca_cert_copy is changed
- name: Update CA store - Centos
command: update-ca-trust
when:
- ansible_pkg_mgr == 'yum'
- openstack_host_ca_cert_copy is changed