Fix gitea rename playbook org creation

The org creation task list requires a list of the existing orgs.
Copy that from the gitea creation playbook.

Change-Id: Ia21f6211004f8dde3cacf4fb549ea8418a6d2888
This commit is contained in:
James E. Blair 2019-05-31 09:11:16 -07:00
parent 3f1d5ccdde
commit 2c6e1e2061
1 changed files with 13 additions and 0 deletions

View File

@ -8,6 +8,19 @@
neworg: "{{ repo.new.split('/')[0] }}"
oldproj: "{{ repo.old.split('/')[1] }}"
newproj: "{{ repo.new.split('/')[1] }}"
- name: Get Gitea org list
# We assume that all the orgs we are interested in are owned by root
uri:
url: "{{ gitea_url }}/api/v1/user/orgs"
user: root
password: "{{ gitea_root_password }}"
force_basic_auth: true
validate_certs: false
status_code: 200
register: gitea_org_list
- name: Parse Gitea org list
set_fact:
gitea_orgs: "{{ gitea_org_list.json | map(attribute='username') | list }}"
- name: "Make new gitea org"
include_tasks: roles/gitea-git-repos/tasks/setup-org.yaml
vars: