forked from quay/quay-ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup-quay.yml
38 lines (37 loc) · 1.06 KB
/
setup-quay.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
- name: Setup Quay and Clair Containers
hosts: quay
gather_facts: no
any_errors_fatal: yes
tags:
- quay
pre_tasks:
- 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
- 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:
- quay