system-config/playbooks/sync-gitea-projects.yaml
Monty Taylor caebf387b4 Translate gitea project creation to python
Sadly, as readable as the use of the uri module to do the interactions
with gitea is, more reent ansible changed how subprocesses are forked
and this makes iterating over all the projects in projects.yaml take
an incredibly long amount of time.

Instead of doing it in yaml, make a python module that takes the list
one time and does looping and requests calls. This should make it be
possible to run the actual gitea creation playbook in integration tests.

Change-Id: Ifff3291c1092e6df09ae339c9e7dddb5ee692685
2019-07-11 08:21:35 -04:00

19 lines
491 B
YAML

- hosts: "localhost:!disabled"
name: "sync-gitea-projects: Collect the project-config ref"
strategy: free
connection: local
tasks:
- name: Clone project-config repo
git:
repo: https://git.openstack.org/openstack-infra/project-config
dest: /opt/project-config
force: yes
- hosts: "gitea:!disabled"
name: "Create repos on gitea servers"
strategy: free
max_fail_percentage: 1
roles:
- role: gitea-git-repos
gitea_always_update: true