fedorainfracloud/virthost-aarch64: add copr user to these virthosts and setup so they can use libvirt

These aarch64 virthosts will have copr builders on them, so
we need to setup a copr user and add their ssh keyfor access,
then make sure they are in the libvirt group so they can manage vms.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
Kevin Fenzi 2019-03-15 20:48:23 +00:00
parent 39cee77465
commit 95ab0c72c6
4 changed files with 20 additions and 0 deletions

View file

@ -294,3 +294,7 @@ dns2: "10.5.126.22"
# This is a list of services that need to wait for VPN to be up before getting started.
postvpnservices: []
# true or false if we are or are not a copr build virthost.
# Default to false
copr_build_virthost: false

View file

@ -8,3 +8,4 @@ gw: 38.145.49.254
dns: 8.8.8.8
postfix_group: vpn
vpn: false
copr_build_virthost: true

View file

@ -8,3 +8,4 @@ gw: 38.145.49.254
dns: 8.8.8.8
postfix_group: vpn
vpn: false
copr_build_virthost: true

View file

@ -118,3 +118,17 @@
- name: setup nested virt on virthosts with nested=true variable
copy: src=kvm_intel.conf dest=/etc/modprobe.d/kvm_intel.conf
when: nested == true
#
# On some hosts in the fedorainfracloud network we want to add some users to be able to manage
# their own vms.
- name: add copr user to some virthosts that will run copr builders
user: name=copr password_lock=true group=libvirt
when: copr_build_virthost
#
# Add the copr ssh key to the copr account
#
- name: Add the copr ssh key to the copr account
authorized_key: key="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeTO0ddXuhDZYM9HyM0a47aeV2yIVWhTpddrQ7/RAIs99XyrsicQLABzmdMBfiZnP0FnHBF/e+2xEkT8hHJpX6bX81jjvs2bb8KP18Nh8vaXI3QospWrRygpu1tjzqZT0Llh4ZVFscum8TrMw4VWXclzdDw6x7csCBjSttqq8F3iTJtQ9XM9/5tCAAOzGBKJrsGKV1CNIrfUo5CSzY+IUVIr8XJ93IB2ZQVASK34T/49egmrWlNB32fqAbDMC+XNmobgn6gO33Yq5Ly7Dk4kqTUx2TEaqDkZfhsVu0YcwV81bmqsltRvpj6bIXrEoMeav7nbuqKcPLTxWEY/2icePF" user=copr
when: copr_build_virthost