Skip to content

Commit deddb35

Browse files
author
DOMjudge team
committed
CDS now has YAML support for accounts, use it as it is way more easy to populate.
1 parent 628d729 commit deddb35

File tree

3 files changed

+12
-16
lines changed

3 files changed

+12
-16
lines changed

icpc-wf/ansible/roles/cds/tasks/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@
5858
when: cds_war.stat.exists
5959
notify: restart cds
6060

61-
- name: Populate CDS accounts.json
61+
- name: Populate CDS accounts.yaml
6262
template:
63-
src: accounts.json.j2
64-
dest: /home/domjudge/cds/wlp/usr/servers/cds/config/accounts.json
63+
src: accounts.yaml.j2
64+
dest: /home/domjudge/cds/wlp/usr/servers/cds/config/accounts.yaml
6565
owner: domjudge
6666
group: domjudge
6767
mode: 0600

icpc-wf/ansible/roles/cds/templates/accounts.json.j2

Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{% for account in CDS_ACCOUNTS %}
2+
- id: {{ account.username }}
3+
username: {{ account.username }}
4+
password: {{ account.password }}
5+
type: {{ account.type }}
6+
{% if account.team_id is defined %}
7+
team_id: "{{ account.team_id }}"
8+
{% endif %}
9+
{% endfor %}

0 commit comments

Comments
 (0)