Skip to content

Commit cd64844

Browse files
committed
Variables cannot be uppercased
1 parent 057846d commit cd64844

File tree

9 files changed

+20
-20
lines changed

9 files changed

+20
-20
lines changed

Diff for: icpc-wf/ansible/admin.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@
8686

8787
- name: Update repo URL based on network
8888
set_fact:
89-
DJ_GIT_REPO_SCRIPTS: "{{ DJ_GIT_REPO_SCRIPTS_RESTRICTED if WF_RESTRICTED_NETWORK else DJ_GIT_REPO_SCRIPTS }}"
89+
dj_git_repo_scripts: "{{ DJ_GIT_REPO_SCRIPTS_RESTRICTED if WF_RESTRICTED_NETWORK else DJ_GIT_REPO_SCRIPTS }}"
9090

9191
- name: create working copy of the domjudge-scripts repo
9292
become: true
9393
become_user: domjudge
9494
# We use a different directory here to have one single 'upstream' and not have issues with it
95-
git: repo={{ DJ_GIT_REPO_SCRIPTS }} dest=/home/domjudge/domjudge-scripts-checkout version=main accept_hostkey=yes update=no
95+
git: repo={{ dj_git_repo_scripts }} dest=/home/domjudge/domjudge-scripts-checkout version=main accept_hostkey=yes update=no
9696

9797
- name: create working copy of the wf2020 repo
9898
become: true

Diff for: icpc-wf/ansible/roles/domjudge_checkout/tasks/main.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111

1212
- name: Update repo URL based on network
1313
set_fact:
14-
DJ_GIT_REPO: "{{ DJ_GIT_REPO_RESTRICTED if WF_RESTRICTED_NETWORK else DJ_GIT_REPO }}"
14+
dj_git_repo: "{{ DJ_GIT_REPO_RESTRICTED if WF_RESTRICTED_NETWORK else DJ_GIT_REPO }}"
1515

1616
- name: Create working copy of the domjudge repo
1717
become: true
1818
become_user: domjudge
19-
git: repo={{ DJ_GIT_REPO }} dest={{ DJ_DIR }} version={{ DJ_BRANCH }} accept_hostkey=yes update=yes
19+
git: repo={{ dj_git_repo }} dest={{ DJ_DIR }} version={{ DJ_BRANCH }} accept_hostkey=yes update=yes
2020
register: git_working_copy
2121

2222
- name: Check composer dependencies present

Diff for: icpc-wf/ansible/roles/grafana/defaults/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
grafana_port: 8443
2-
LOKI: false
2+
loki: false

Diff for: icpc-wf/ansible/roles/grafana/tasks/main.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
remote_src: true
3838
owner: domjudge
3939
group: domjudge
40-
when: LOKI
40+
when: loki
4141

4242
- name: Dir for loki settings
4343
file:
@@ -46,7 +46,7 @@
4646
owner: root
4747
group: root
4848
mode: 0755
49-
when: LOKI
49+
when: loki
5050

5151
- name: Set loki settings
5252
copy:
@@ -55,23 +55,23 @@
5555
owner: root
5656
group: root
5757
mode: 0644
58-
when: LOKI
58+
when: loki
5959
notify: restart loki
6060

6161
- name: Setup loki systemd
6262
copy:
6363
src: loki.service
6464
dest: /etc/systemd/system/
6565
mode: 0655
66-
when: LOKI
66+
when: loki
6767
notify: restart loki
6868

6969
- name: Start loki service
7070
service:
7171
name: loki
7272
state: started
7373
enabled: true
74-
when: LOKI
74+
when: loki
7575

7676
## Setup grafana
7777
- name: Install grafana

Diff for: icpc-wf/ansible/roles/grafana/templates/nginx.conf.j2

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ server {
1010
proxy_read_timeout 90;
1111
}
1212

13-
{% if LOKI %}
13+
{% if loki %}
1414
location /loki/ {
1515
proxy_set_header X-Forwarded-Proto https;
1616
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

Diff for: icpc-wf/ansible/roles/judgedaemon/tasks/main.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
- name: create domjudge-run users
55
user: name=domjudge-run-{{ item }} createhome=no home=/nonexistent group=nogroup shell=/bin/false
6-
loop: "{{ CPUCORE }}"
6+
loop: "{{ cpucore }}"
77

88
- name: create domjudge-run group
99
group: name=domjudge-run state=present
@@ -30,7 +30,7 @@
3030

3131
- name: Pre-generate the kernel flags for ansible usage
3232
set_fact:
33-
procline: "cgroup_enable=memory swapaccount=1 isolcpus={{ CPUCORE|join(',') }}"
33+
procline: "cgroup_enable=memory swapaccount=1 isolcpus={{ cpucore|join(',') }}"
3434

3535
- name: add cgroup kernel parameters
3636
lineinfile:

Diff for: icpc-wf/ansible/roles/judgedaemon/vars/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CPUCORE:
1+
cpucore:
22
- 2
33
# Add additional CPU cores to pin judgedaemons on as:
44
# - 3
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
PROM: true
1+
prom: true

Diff for: icpc-wf/ansible/roles/prometheus_target_all/tasks/main.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
remote_src: true
1616
owner: domjudge
1717
group: domjudge
18-
when: PROM
18+
when: prom
1919

2020
- name: Dir for promtail settings
2121
file:
@@ -24,7 +24,7 @@
2424
owner: root
2525
group: root
2626
mode: 0755
27-
when: PROM
27+
when: prom
2828

2929
- name: Set promtail settings
3030
copy:
@@ -33,7 +33,7 @@
3333
owner: root
3434
group: root
3535
mode: 0644
36-
when: PROM
36+
when: prom
3737
notify: restart promtail
3838

3939
- name: Setup promtail systemd
@@ -43,12 +43,12 @@
4343
mode: 0655
4444
owner: root
4545
group: root
46-
when: PROM
46+
when: prom
4747
notify: restart promtail
4848

4949
- name: Start promtail service
5050
service:
5151
name: promtail
5252
state: started
5353
enabled: true
54-
when: PROM
54+
when: prom

0 commit comments

Comments
 (0)