From 714636b6edcb0185b805102a700e0ebbb5a4c160 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Wed, 27 Apr 2016 17:55:14 +0000 Subject: [PATCH] Move koji runroot config to a template and add some changes just for staging. Prod is untouched. Ticket 5253 --- roles/koji_builder/tasks/main.yml | 2 +- .../runroot.conf => templates/runroot.conf.j2} | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) rename roles/koji_builder/{files/runroot.conf => templates/runroot.conf.j2} (74%) diff --git a/roles/koji_builder/tasks/main.yml b/roles/koji_builder/tasks/main.yml index 15fa6d2f22..e7fef8b8f4 100644 --- a/roles/koji_builder/tasks/main.yml +++ b/roles/koji_builder/tasks/main.yml @@ -131,7 +131,7 @@ - koji_builder - name: config for the kojid runroot plugin (only some builders) - copy: src=runroot.conf dest=/etc/kojid/runroot.conf + template: src=runroot.conf.j2 dest=/etc/kojid/runroot.conf when: "'runroot' in group_names" notify: - restart kojid diff --git a/roles/koji_builder/files/runroot.conf b/roles/koji_builder/templates/runroot.conf.j2 similarity index 74% rename from roles/koji_builder/files/runroot.conf rename to roles/koji_builder/templates/runroot.conf.j2 index c274a0992a..89d16cafb9 100644 --- a/roles/koji_builder/files/runroot.conf +++ b/roles/koji_builder/templates/runroot.conf.j2 @@ -4,7 +4,12 @@ ; paths have readonly options and are made writable via extra_mounts ; parameter for individual calls. ; default_mounts = /mnt/archive,/mnt/workdir +{% if {{ env }} == 'production' %} default_mounts = /mnt/koji +{% elif {{ env }} == 'staging' %} +; In staging we also need the production split volume +default_mounts = /mnt/koji,/mnt/fedora_koji_prod/koji +{% endif %} ; comma-delimited list of safe roots. ; Each extra_mount needs to start with some of these prefixes. Other paths are @@ -37,3 +42,11 @@ path = /mnt/koji fstype = bind options = bind +{% if {{ env }} == 'staging' %} +; we need to mount the production split volume here. +[path2] +mountpoint = /mnt/fedora_koji_prod/koji +path = /mnt/fedora_koji_prod/koji +fstype = bind +options = ro,bind +{% endif %}