diff --git a/inventory/group_vars/all b/inventory/group_vars/all index 4d6560e4bd..9db27ed52f 100644 --- a/inventory/group_vars/all +++ b/inventory/group_vars/all @@ -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 diff --git a/inventory/host_vars/virthost-aarch64-os01.fedorainfracloud.org b/inventory/host_vars/virthost-aarch64-os01.fedorainfracloud.org index 680a7294cf..c191258f18 100644 --- a/inventory/host_vars/virthost-aarch64-os01.fedorainfracloud.org +++ b/inventory/host_vars/virthost-aarch64-os01.fedorainfracloud.org @@ -8,3 +8,4 @@ gw: 38.145.49.254 dns: 8.8.8.8 postfix_group: vpn vpn: false +copr_build_virthost: true diff --git a/inventory/host_vars/virthost-aarch64-os02.fedorainfracloud.org b/inventory/host_vars/virthost-aarch64-os02.fedorainfracloud.org index 0547a34adb..7b7839ba92 100644 --- a/inventory/host_vars/virthost-aarch64-os02.fedorainfracloud.org +++ b/inventory/host_vars/virthost-aarch64-os02.fedorainfracloud.org @@ -8,3 +8,4 @@ gw: 38.145.49.254 dns: 8.8.8.8 postfix_group: vpn vpn: false +copr_build_virthost: true diff --git a/roles/virthost/tasks/main.yml b/roles/virthost/tasks/main.yml index b3e468d826..efbbf06382 100644 --- a/roles/virthost/tasks/main.yml +++ b/roles/virthost/tasks/main.yml @@ -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