-
Notifications
You must be signed in to change notification settings - Fork 14
/
p_setup-quay-ha.yml
45 lines (39 loc) · 1.22 KB
/
p_setup-quay-ha.yml
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
- name: Setup Quay and Clair Containers
hosts: quay
user: "{{ quay_vm_user }}"
become: true
gather_facts: no
any_errors_fatal: yes
pre_tasks:
- name: Set Quay Runtime User
when: is_quay | default(false) | bool
block:
- name: Get Quay User UID
shell: "getent passwd {{ quay_runtime_user }} | cut -d ':' -f 3 || false"
changed_when: false
register: quay_runtime_uid_out
- name: Setup user for Quay
when: "quay_runtime_uid_out.stdout | default('') == ''"
user:
name: "{{ quay_runtime_user }}"
system: yes
home: /dev/null
shell: /bin/false
create_home: no
- name: Set Clair runtime user
when: is_clair | default(false) | bool
block:
- name: Get Clair User UID
shell: "getent passwd {{ clair_runtime_user }} | cut -d ':' -f 3 || false"
changed_when: false
register: clair_runtime_uid_out
- name: Setup user for Clair
when: "clair_runtime_uid_out.stdout | default('') == ''"
user:
name: "{{ clair_runtime_user }}"
system: yes
home: /dev/null
shell: /bin/false
create_home: no
roles:
- r_quay