configpolicy/roles/koji-client/tasks/main.yml

48 lines
1.3 KiB
YAML

- name: ensure koji client is installed
package:
name=koji
state=present
tags:
- install
- name: ensure koji client configuration directory exists
file:
path={{ koji_client_dir }}
owner={{ koji_client_user }}
group={{ koji_client_group }}
mode={{ koji_client_dir_mode }}
state=directory
- name: ensure koji client is configured
template:
src=config.j2
dest={{ koji_config_path }}
owner={{ koji_client_user }}
group={{ koji_client_group }}
mode={{ koji_client_config_mode }}
- name: ensure koji ca certificates are installed
copy:
src={{ item }}
dest={{ koji_client_dir }}/{{ item|basename }}
owner={{ koji_client_user }}
group={{ koji_client_group }}
mode={{ koji_client_config_mode }}
with_fileglob:
- certs/koji//{{ koji_client_id }}/*.crt
- name: ensure koji hub server ca certificate is trusted
copy:
src={{ item }}
dest=/etc/pki/ca-trust/source/anchors/koji-hub.crt
mode=0644
with_fileglob:
- certs/koji/{{ koji_client_id }}/serverca.crt
notify: update ca trust
- name: ensure koji client certificate is installed
copy:
src={{ item }}
dest={{ koji_client_dir }}/client.pem
owner={{ koji_client_user }}
group={{ koji_client_group }}
mode={{ koji_client_cert_mode }}
with_fileglob:
- certs/koji/{{ koji_client_id }}/client.pem