diff --git a/playbooks/rename_repos.yaml b/playbooks/rename_repos.yaml index 3b65896ff2..71a2b0d228 100644 --- a/playbooks/rename_repos.yaml +++ b/playbooks/rename_repos.yaml @@ -79,6 +79,30 @@ shell: echo 'update projects set name="{{ item.new }}" where name="{{ item.old }}";' | mysql --defaults-file=/etc/mysql/debian.cnf storyboard with_items: "{{ repos }}" +- hosts: zuul-scheduler + gather_facts: False + remote_user: root + tasks: + + - include_vars: "{{ repolist }}" + + - name: Make organization dirs + file: + state: directory + path: "{{ (item[0] + item[1].new) | dirname }}" + group: zuul + owner: zuul + mode: 0755 + with_nested: + - [ '/var/lib/zuul/keys/secrets/project/gerrit/', '/var/lib/zuul/keys/ssh/project/gerrit/' ] + - "{{ repos }}" + + - name: Rename keys on Zuul + shell: mv {{ item[0] }}{{ item[1].old }} {{ item[0] }}{{ item[1].new }} + with_nested: + - [ '/var/lib/zuul/keys/secrets/project/gerrit/', '/var/lib/zuul/keys/ssh/project/gerrit/' ] + - "{{ repos }}" + - hosts: review gather_facts: False remote_user: root