From 906e6a72a19adf384ec936252a0af5353e5bb5da Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Sat, 21 Mar 2020 10:46:31 -0500 Subject: [PATCH] Use dev subdir on review-dev for project-config things This is in anticipation of running manage-projects, which wants to use the dev subdir of project-config when run on dev, but we're currently not doing anything with that. Point at root or dev as appropriate. Then we can do a similar thing - probably just bind-mounting the root or the dev when we docker run for manage-projects. Change-Id: Ia13bbb0bf8dbe1f7e7c0f378ba9b41bef3ecd5c1 --- playbooks/host_vars/review-dev01.opendev.org.yaml | 1 + playbooks/roles/gerrit/defaults/main.yaml | 1 + playbooks/roles/gerrit/tasks/main.yaml | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/playbooks/host_vars/review-dev01.opendev.org.yaml b/playbooks/host_vars/review-dev01.opendev.org.yaml index 95ed669b49..a3f4b1f044 100644 --- a/playbooks/host_vars/review-dev01.opendev.org.yaml +++ b/playbooks/host_vars/review-dev01.opendev.org.yaml @@ -10,3 +10,4 @@ letsencrypt_gid: 3001 gerrit_storyboard_url: https://storyboard-dev.openstack.org gerrit_vhost_name: review-dev.opendev.org gerrit_redirect_vhost: review-dev.openstack.org +gerrit_project_config_base: /opt/project-config/dev diff --git a/playbooks/roles/gerrit/defaults/main.yaml b/playbooks/roles/gerrit/defaults/main.yaml index 8e5bbc1f69..6d84d8c691 100644 --- a/playbooks/roles/gerrit/defaults/main.yaml +++ b/playbooks/roles/gerrit/defaults/main.yaml @@ -17,3 +17,4 @@ gerrit_container_volumes: - /home/gerrit2/.launchpadlib:/var/gerrit/.launchpadlib - /home/gerrit2/.ssh:/var/gerrit/.ssh gerrit_database_type: MYSQL +gerrit_project_config_base: /opt/project-config diff --git a/playbooks/roles/gerrit/tasks/main.yaml b/playbooks/roles/gerrit/tasks/main.yaml index 42ba69b289..3629427751 100644 --- a/playbooks/roles/gerrit/tasks/main.yaml +++ b/playbooks/roles/gerrit/tasks/main.yaml @@ -202,7 +202,7 @@ - name: Copy notify-impact yaml file copy: - src: "/opt/project-config/gerrit/notify_impact.yaml" + src: "{{ gerrit_project_config_base }}/gerrit/notify_impact.yaml" dest: "{{ gerrit_site_dir }}/hooks/notify_impact.yaml" remote_src: yes owner: "{{ gerrit_user_name }}"