From bde5860f57736aa11fc079d5d62dd36d8bcfd7a4 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Mon, 30 Mar 2020 13:49:55 -0500 Subject: [PATCH] Parameterize manage-projects logging output Change-Id: If4c456957fdce308ccafee0dfad8b627a85ea796 --- playbooks/roles/gerrit/defaults/main.yaml | 1 + playbooks/roles/gerrit/tasks/manage-projects.yaml | 2 +- playbooks/roles/gerrit/templates/manage-projects.j2 | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/playbooks/roles/gerrit/defaults/main.yaml b/playbooks/roles/gerrit/defaults/main.yaml index 4a18a15dbb..09951c4c47 100644 --- a/playbooks/roles/gerrit/defaults/main.yaml +++ b/playbooks/roles/gerrit/defaults/main.yaml @@ -20,3 +20,4 @@ gerrit_container_volumes: gerrit_database_type: MYSQL gerrit_project_config_base: /opt/project-config gerrit_project_creator_user: openstack-project-creator +gerrit_manage_projects_args: "-v -l /var/log/manage_projects.log" diff --git a/playbooks/roles/gerrit/tasks/manage-projects.yaml b/playbooks/roles/gerrit/tasks/manage-projects.yaml index b305acf531..3f44938c7e 100644 --- a/playbooks/roles/gerrit/tasks/manage-projects.yaml +++ b/playbooks/roles/gerrit/tasks/manage-projects.yaml @@ -2,4 +2,4 @@ command: "docker pull {{ gerrit_container_image }}" - name: Run manage-projects - command: /usr/local/bin/manage-projects + command: "/usr/local/bin/manage-projects {{ gerrit_manage_projects_args }}" diff --git a/playbooks/roles/gerrit/templates/manage-projects.j2 b/playbooks/roles/gerrit/templates/manage-projects.j2 index 4e59718cb2..d7e94425fb 100644 --- a/playbooks/roles/gerrit/templates/manage-projects.j2 +++ b/playbooks/roles/gerrit/templates/manage-projects.j2 @@ -23,4 +23,4 @@ exec docker run --rm --net=host -u root \ -v/home/gerrit2/review_site/etc/ssh_project_rsa_key:/home/gerrit2/review_site/etc/ssh_project_rsa_key \ -v/home/gerrit2/projects.ini:/home/gerrit2/projects.ini \ -v/var/log:/var/log \ - {{ gerrit_container_image }} manage-projects -v -l /var/log/manage_projects.log + {{ gerrit_container_image }} manage-projects $@