diff --git a/playbooks/groups/openqa.yml b/playbooks/groups/openqa.yml index 13fa192bfa..da78522ff4 100644 --- a/playbooks/groups/openqa.yml +++ b/playbooks/groups/openqa.yml @@ -49,12 +49,21 @@ handlers: - include: "{{ handlers }}/restart_services.yml" +# for now just stg while we're testing - name: set up openQA server data NFS mounts -# for now just stg while we're testing, this is a temp location to create dirs hosts: openqa-stg roles: - role: nfs/client - mnt_dir: '/mnt/temp' - nfs_src_dir: 'fedora_openqa_stg' - nfs_mount_opts: 'rw,bg' + mnt_dir: '/var/lib/openqa/testresults' + nfs_src_dir: 'fedora_openqa_stg/testresults' + nfs_mount_opts: 'rw,bg,nfsvers=3' + tags: ['nfs_client'] + +- name: set up openQA server data NFS mounts + hosts: openqa-stg + roles: + - role: nfs/client + mnt_dir: '/var/lib/openqa/images' + nfs_src_dir: 'fedora_openqa_stg/images' + nfs_mount_opts: 'rw,bg,nfsvers=3' tags: ['nfs_client'] diff --git a/roles/openqa/server/tasks/main.yml b/roles/openqa/server/tasks/main.yml index b0a62bf78d..2e5dda9b18 100644 --- a/roles/openqa/server/tasks/main.yml +++ b/roles/openqa/server/tasks/main.yml @@ -32,6 +32,34 @@ # set, the server will use a local SQLite database and the other values # are ignored. +# As we want to store some geekotest-owned files in shared storage, we +# need to ensure geekotest always has the same uid/gid if we re-deploy +# the servers. So we create the account here with uid/gid 601. + +# this first one is just to make sure I don't screw up prod while I'm +# fiddling with this stuff on stg +- name: Check if geekotest already exists (temp) + command: "getent passwd geekotest" + register: gotgeeko + failed_when: "1 != 1" + changed_when: "1 != 1" + always_run: true + +- name: Create geekotest group with static GID 601 + group: name=geekotest gid=601 system=yes + when: "gotgeeko.rc > 0" + +- name: Create geekotest user with static UID 601 + user: + name: geekotest + comment: "openQA user" + uid: 601 + home: "/var/lib/openqa" + createhome: no + system: yes + shell: /sbin/nologin + when: "gotgeeko.rc > 0" + - name: Install required packages dnf: name={{ item }} state=present enablerepo=adamwill-openQA with_items: