copr-hv: install copr user

This commit is contained in:
Pavel Raiskup 2021-04-22 18:32:13 +02:00
parent 1d48d31293
commit 34de1182cd
2 changed files with 35 additions and 0 deletions

View file

@ -0,0 +1 @@
../../../copr/backend/files/provision/files/buildsys.pub

View file

@ -0,0 +1,34 @@
---
- name: create the copr user
user: name=copr uid=11666
- name: assure that copr-be can ssh there as copr@...
authorized_key: user=copr key="{{ item }}"
with_file:
- buildsys.pub
# todo: generate it's own key
- name: make sure hostA can ssh to hostB
copy:
src: "{{ private }}/files/copr/buildsys.priv"
dest: /home/copr/.ssh/id_rsa
owner: copr
group: copr
mode: 0600
- name: install libvirt packages
package: name={{ item }} state=present
with_items:
- qemu-kvm
- libvirt
- virt-install
- name: install libvirtd.conf
copy: src="{{ files }}/virthost/libvirtd.conf" dest=/etc/libvirt/libvirtd.conf
notify:
- restart libvirtd
tags:
- config
- name: add copr user to some virthosts that will run copr builders
user: name=copr password_lock=true group=libvirt