Merge "Project renames include keys on zuul scheduler"

This commit is contained in:
Zuul 2019-05-30 17:20:32 +00:00 committed by Gerrit Code Review
commit 060f4dcbbe
1 changed files with 24 additions and 0 deletions

View File

@ -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