From 3ff54079887cc5d5728a5e1b8ccceb017589bffa Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Wed, 2 Dec 2020 15:28:32 -0800 Subject: [PATCH] Test manage-projects repos harder The previous change assumed that all projects would have their acl file paths updated via ansible's lineinfile module. But lineinfile only updates the last match. Since we've got two config lines we want to match and update we run the lineinfile task twice which should end up updating both of them. Change-Id: I714281d86569f248f4ae3d909b019f060fe6c520 --- playbooks/jeepyb-integration/run.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/playbooks/jeepyb-integration/run.yaml b/playbooks/jeepyb-integration/run.yaml index e0341a5..39cdeae 100644 --- a/playbooks/jeepyb-integration/run.yaml +++ b/playbooks/jeepyb-integration/run.yaml @@ -71,7 +71,14 @@ shell: cmd: PROJECTS_INI=tools/projects.ini PROJECTS_YAML=tools/projects.yaml manage-projects -v chdir: src/opendev.org/opendev/gerritlib + - name: Change test-repo-2 acls but don't change groups + # Lineinfile only replaces the last match so we do this twice + lineinfile: + path: src/opendev.org/opendev/gerritlib/tools/projects.yaml + regexp: '^ acl-config: tools/acls/test/test.config' + line: ' acl-config: tools/acls/test/test2.config' - name: Change test-repo-1 acls but don't change groups + # Lineinfile only replaces the last match so we do this twice lineinfile: path: src/opendev.org/opendev/gerritlib/tools/projects.yaml regexp: '^ acl-config: tools/acls/test/test.config'