ansible-role-zuul-registry/tasks/config.yaml
Paul Belanger 854912f814 Add zuul-registry crontab entry
This is so we can prune images regularly.

Change-Id: If1d34ac0a6c2eece92b854e6fe0bdf3602fbb02b
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2020-11-30 13:01:36 -05:00

65 lines
2.3 KiB
YAML

# Copyright 2015 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: true
file:
group: "{{ zuul_registry_user_group }}"
owner: "{{ zuul_registry_user_name }}"
path: "{{ item }}"
state: directory
with_items:
- /etc/zuul-registry
- /etc/zuul-registry/ssl
- /var/lib/zuul-registry/storage
- name: Install zuul-registry configuration
become: true
template:
dest: "{{ zuul_registry_file_registry_yaml_dest }}"
group: "{{ zuul_registry_file_registry_yaml_group }}"
mode: "{{ zuul_registry_file_registry_yaml_mode }}"
owner: "{{zuul_registry_file_registry_yaml_owner }}"
src: "{{ zuul_registry_file_registry_yaml_src }}"
register: zuul_registry_file_registry_yaml
- name: Install zuul ssl cert configuration
become: true
template:
dest: "{{ zuul_registry_file_ssl_cert_dest }}"
group: "{{ zuul_registry_file_ssl_cert_group }}"
mode: "{{ zuul_registry_file_ssl_cert_mode }}"
owner: "{{ zuul_registry_file_ssl_cert_owner }}"
src: "{{ zuul_registry_file_ssl_cert_src }}"
register: zuul_registry_file_ssl_cert
- name: Install zuul ssl key configuration
become: true
template:
dest: "{{ zuul_registry_file_ssl_key_dest }}"
group: "{{ zuul_registry_file_ssl_key_group }}"
mode: "{{ zuul_registry_file_ssl_key_mode }}"
owner: "{{ zuul_registry_file_ssl_key_owner }}"
src: "{{ zuul_registry_file_ssl_key_src }}"
register: zuul_registry_file_ssl_key
- name: Install zuul-registry crontab
become: true
template:
dest: "{{ zuul_registry_file_crontab_dest }}"
group: "{{ zuul_registry_file_crontab_group }}"
mode: "{{ zuul_registry_file_crontab_mode }}"
owner: "{{ zuul_registry_file_crontab_owner }}"
src: "{{ zuul_registry_file_crontab_src }}"