Project renames include keys on zuul scheduler
Add tasks to the rename_repos utility playbook for moving the per-project secrets and ssh keys on the zuul scheduler's filesystem, creating new namespace parent directories if they don't already exist. Change-Id: Iccce53953d5829bd4eb5fe4c33c9d2f195ae825c
This commit is contained in:
parent
35713be4a9
commit
4f117bcecc
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user