-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquay-configure.yaml
68 lines (63 loc) · 1.93 KB
/
quay-configure.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
- name: Create org and repos
gather_facts: no
hosts: localhost
vars:
quay_teams:
- name: maintainers
organization: productcatalog
description: Maintainers of product catalog images
members:
- user1
role: member
quay_organizations:
- name: productcatalog
email: [email protected]
time_machine_expiration: 14d
quay_repositories:
- name: server
organization: productcatalog
description: Product Catalog back-end
permissions:
- name: maintainers
type: team
role: admin
- name: client
org: productcatalog
description: Product Catalog front-end
permissions:
- name: productcatalog
type: team
role: admin
tasks:
- name: create organizations
herve4m.quay.quay_organization:
name: "{{ item.name }}"
email: "{{ item.email }}"
time_machine_expiration: "{{ item.time_machine_expiration }}"
state: present
quay_host: "{{ quay_route }}"
quay_token: "{{ access_token }}"
with_items: "{{ quay_organizations }}"
- name: Create teams
herve4m.quay.quay_team:
name: "{{ item.name }}"
organization: "{{ item.organization }}"
description: "{{ item.description }}"
role: "{{ item.role }}"
members: "{{ item.members }}"
append: false
state: present
quay_host: "{{ quay_route }}"
quay_token: "{{ access_token }}"
with_items: "{{ quay_teams }}"
- name: create repositories
herve4m.quay.quay_repository:
name: "{{ item.organization }}/{{ item.name }}"
visibility: private
description: "{{ item.description }}"
perms: "{{ item.permissions }}"
state: present
quay_host: "{{ quay_route }}"
quay_token: "{{ access_token }}"
with_items: "{{ quay_repositories }}"