diff --git a/playbooks/groups/koji-hub.yml b/playbooks/groups/koji-hub.yml index 7bfc47c43d..465a628157 100644 --- a/playbooks/groups/koji-hub.yml +++ b/playbooks/groups/koji-hub.yml @@ -43,86 +43,78 @@ owner_user: apache host: "koji{{env_suffix}}.fedoraproject.org" - { role: nfs/server, when: env == "staging" } - - { role: keepalived, when: env == "production" and inventory_hostname.startswith('koji') and datacenter == 'phx2' } + + # production nfs mounts from netapp - role: nfs/client mnt_dir: '/mnt/fedora_koji' nfs_src_dir: 'fedora_koji' when: env == 'production' and inventory_hostname.startswith('koji') + - role: nfs/client mnt_dir: '/mnt/fedora_koji/koji/vol/fedora_koji_archive00' nfs_src_dir: 'fedora_koji_archive00' when: env == 'production' and inventory_hostname.startswith('koji') + - role: nfs/client mnt_dir: '/mnt/fedora_koji/koji/vol/fedora_koji_archive01' nfs_src_dir: 'fedora_koji_archive01' when: env == 'production' and inventory_hostname.startswith('koji') + - role: nfs/client mnt_dir: '/mnt/fedora_koji/koji/vol/fedora_koji_archive02' nfs_src_dir: 'fedora_koji_archive02' when: env == 'production' and inventory_hostname.startswith('koji') + - role: nfs/client mnt_dir: '/mnt/fedora_koji/koji/vol/fedora_koji_archive03' nfs_src_dir: 'fedora_koji_archive03' when: env == 'production' and inventory_hostname.startswith('koji') + - role: nfs/client mnt_dir: '/mnt/fedora_koji/koji/vol/fedora_koji_archive04' nfs_src_dir: 'fedora_koji_archive04' when: env == 'production' and inventory_hostname.startswith('koji') + - role: nfs/client mnt_dir: '/mnt/fedora_koji/koji/vol/fedora_koji_archive05' nfs_src_dir: 'fedora_koji_archive05' when: env == 'production' and inventory_hostname.startswith('koji') + - role: nfs/client - mnt_dir: '/mnt/koji' - nfs_src_dir: 'fedora_s390/data' - when: env == 'production' and inventory_hostname.startswith('s390') + mnt_dir: '/mnt/koji/ostree' + nfs_src_dir: 'fedora_ostree_content/ostree' + mount_stg: true + when: env != 'staging' + - role: nfs/client - mnt_dir: '/mnt/koji' - nfs_src_dir: 'fedora_ppc/data' - when: env == 'production' and inventory_hostname.startswith('ppc') + mnt_dir: '/mnt/koji/compose/ostree' + mount_stg: true + nfs_src_dir: 'fedora_ostree_content/compose/ostree' + when: env != 'staging' + - role: nfs/client - mnt_dir: '/mnt/koji' - nfs_src_dir: 'fedora_arm/data' - when: env == 'production' and inventory_hostname.startswith('arm') + mnt_dir: '/srv/odcs' + nfs_src_dir: 'fedora_odcs' + when: env != 'staging' + # In staging, we mount fedora_koji as read only (see nfs_mount_opts) - role: nfs/client mnt_dir: '/mnt/fedora_koji_prod' nfs_src_dir: 'fedora_koji' when: env == 'staging' and inventory_hostname.startswith('koji') - - role: nfs/client - mnt_dir: '/mnt/koji/ostree' - nfs_src_dir: 'fedora_ostree_content/ostree' - mount_stg: true - when: env != 'staging' and datacenter == 'phx2' - - role: nfs/client - mnt_dir: '/mnt/koji/compose/ostree' - mount_stg: true - nfs_src_dir: 'fedora_ostree_content/compose/ostree' - when: env != 'staging' and datacenter == 'phx2' - - role: nfs/client - mnt_dir: '/mnt/koji/ostree' - nfs_src_dir: 'fedora_ostree_content/ostree' - mount_stg: true - when: env != 'staging' and datacenter == 'iad2' - - role: nfs/client - mnt_dir: '/mnt/koji/compose/ostree' - mount_stg: true - nfs_src_dir: 'fedora_ostree_content/compose/ostree' - when: env != 'staging' and datacenter == 'iad2' + - role: nfs/client mnt_dir: '/mnt/koji/ostree' nfs_src_dir: 'fedora_ostree_content/ostree' mount_stg: true when: env == 'staging' + - role: nfs/client mnt_dir: '/mnt/koji/compose/ostree' mount_stg: true nfs_src_dir: 'fedora_ostree_content/compose/ostree' when: env == 'staging' - - role: nfs/client - mnt_dir: '/srv/odcs' - nfs_src_dir: 'fedora_odcs' - when: env != 'staging' + - sudo - role: rabbit/user username: "koji{{ env_suffix }}" diff --git a/roles/koji_hub/tasks/main.yml b/roles/koji_hub/tasks/main.yml index fd24c755ba..a615cf561a 100644 --- a/roles/koji_hub/tasks/main.yml +++ b/roles/koji_hub/tasks/main.yml @@ -429,7 +429,7 @@ tags: - koji_hub -- name: install cron jobs to be used by keepalived later +- name: install cron jobs in /usr/local/etc/ copy: src={{ item }} dest=/usr/local/etc/{{ item }} with_items: - koji-directory-cleanup @@ -439,6 +439,16 @@ - files - koji_hub +- name: enable crons on koji02 normally. + copy: src={{ item }} dest=/etc/cron.d/{{ item }} + with_items: + - koji-directory-cleanup + - koji-gc + - koji-prune-signed-copies + tags: + - files + when: env != 'staging' and ansible_hostname.startswith('koji02') + - name: Create shadow user user: name=koji_shadow when: "fedmsg_koji_instance != 'primary'" diff --git a/roles/postgresql_server/tasks/main.yml b/roles/postgresql_server/tasks/main.yml index 78d9869493..048d55df33 100644 --- a/roles/postgresql_server/tasks/main.yml +++ b/roles/postgresql_server/tasks/main.yml @@ -154,6 +154,7 @@ copy: > src=koji-cleanup-sessions.cron dest=/etc/cron.d/koji-cleanup-sessions.cron + state=absent when: inventory_hostname.startswith('db-koji01') tags: - cron