Skip to content

Commit 76c5e91

Browse files
committed
Various yaml fixes
1 parent 07dd870 commit 76c5e91

File tree

36 files changed

+203
-209
lines changed

36 files changed

+203
-209
lines changed

icpc-wf/ansible/admin.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
hosts: admin
66
vars:
77
host_type: admin
8-
become: yes
8+
become: true
99
roles:
1010
- role: base_packages
1111
tags: base_packages
@@ -49,10 +49,10 @@
4949
apt:
5050
state: present
5151
pkg:
52-
- gitk
53-
- git-gui
54-
- makepasswd
55-
- mmv
52+
- gitk
53+
- git-gui
54+
- makepasswd
55+
- mmv
5656

5757
- name: enable developer mode
5858
lineinfile:
@@ -89,13 +89,13 @@
8989
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
92-
become: yes
92+
become: true
9393
become_user: domjudge
9494
# We use a different directory here to have one single 'upstream' and not have issues with it
9595
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
98-
become: yes
98+
become: true
9999
become_user: domjudge
100100
git: repo=git@cds:wf2020 dest=/home/domjudge/wf2020 version=master accept_hostkey=yes update=no
101101

icpc-wf/ansible/cds.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
hosts: cds
66
vars:
77
host_type: cds
8-
become: yes
8+
become: true
99
roles:
1010
- role: base_packages
1111
tags: base_packages

icpc-wf/ansible/domserver.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
hosts: domserver
66
vars:
77
host_type: domserver
8-
become: yes
8+
become: true
99
roles:
1010
- role: base_packages
1111
tags: base_packages
@@ -53,9 +53,9 @@
5353
apt:
5454
state: present
5555
pkg:
56-
- python3-mysqldb
57-
- macchanger
58-
- molly-guard
56+
- python3-mysqldb
57+
- macchanger
58+
- molly-guard
5959

6060
- name: disable developer mode
6161
lineinfile:
@@ -67,7 +67,7 @@
6767
synchronize:
6868
src: files/domjudge-public/
6969
dest: "{{DJ_DIR}}/webapp/public"
70-
owner: no
70+
owner: false
7171
use_ssh_args: true
7272
notify: clear application cache
7373

icpc-wf/ansible/grafana.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
- hosts: grafana
44
vars:
55
host_type: grafana
6-
become: yes
6+
become: true
77
roles:
88
- role: base_packages
99
tags: base_packages

icpc-wf/ansible/handlers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
---
33
- name: clear application cache
44
command: "{{DJ_DIR}}/webapp/bin/console cache:clear"
5-
become: yes
5+
become: true
66
become_user: domjudge

icpc-wf/ansible/judgehost.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33

44
- name: setup judgehost
55
hosts: judgehost
6+
# We always leave 1/3 of the judges online
67
serial:
7-
- 33% # We always leave 1/3 of the judges online
8+
- 33%
89
- 33%
910
- 34%
1011
vars:
1112
host_type: judgehost
12-
become: yes
13+
become: true
1314
roles:
1415
- role: base_packages
1516
tags: base_packages

icpc-wf/ansible/mgmt.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
hosts: mgmt
66
vars:
77
host_type: mgmt
8-
become: yes
8+
become: true
99
roles:
1010
- role: prometheus_target_all
1111
tags: prometheus_target_all

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

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -47,62 +47,62 @@
4747
apt:
4848
state: absent
4949
pkg:
50-
- apport
51-
- ntp
50+
- apport
51+
- ntp
5252

5353
- name: install common required/useful packages
5454
apt:
5555
state: present
5656
pkg:
57-
- ack
58-
- git
59-
- htop
60-
- httpie
61-
- ncdu
62-
- pv
63-
- screen
64-
- autoconf
65-
- automake
66-
- efibootmgr
67-
- curl
68-
- gcc
69-
- g++
70-
- default-jdk-headless
71-
- make
72-
- zip
73-
- unzip
74-
- php-cli
75-
- php-gd
76-
- php-curl
77-
- php-mysql
78-
- php-json
79-
- php-xml
80-
- php-zip
81-
- php-mbstring
82-
- php-intl
83-
- bsdmainutils
84-
- libcgroup-dev
85-
- libcurl4-gnutls-dev
86-
- libjsoncpp-dev
87-
- libmagic-dev
88-
- debootstrap
89-
- texlive-latex-recommended
90-
- texlive-latex-extra
91-
- apache2-utils
92-
- tig
93-
- bat
94-
- jq
95-
- python3-sphinx
96-
- autoconf
97-
- automake
98-
- bats
99-
- python3-sphinx
100-
- python3-sphinx-rtd-theme
101-
- rst2pdf
102-
- fontconfig
103-
- python3-yaml
104-
- latexmk
105-
- acl
57+
- ack
58+
- git
59+
- htop
60+
- httpie
61+
- ncdu
62+
- pv
63+
- screen
64+
- autoconf
65+
- automake
66+
- efibootmgr
67+
- curl
68+
- gcc
69+
- g++
70+
- default-jdk-headless
71+
- make
72+
- zip
73+
- unzip
74+
- php-cli
75+
- php-gd
76+
- php-curl
77+
- php-mysql
78+
- php-json
79+
- php-xml
80+
- php-zip
81+
- php-mbstring
82+
- php-intl
83+
- bsdmainutils
84+
- libcgroup-dev
85+
- libcurl4-gnutls-dev
86+
- libjsoncpp-dev
87+
- libmagic-dev
88+
- debootstrap
89+
- texlive-latex-recommended
90+
- texlive-latex-extra
91+
- apache2-utils
92+
- tig
93+
- bat
94+
- jq
95+
- python3-sphinx
96+
- autoconf
97+
- automake
98+
- bats
99+
- python3-sphinx
100+
- python3-sphinx-rtd-theme
101+
- rst2pdf
102+
- fontconfig
103+
- python3-yaml
104+
- latexmk
105+
- acl
106106

107107
- name: Check if composer is installed
108108
stat:

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
shell: systemctl daemon-reload
66

77
- name: restart cds
8-
service: name=cds enabled=yes state=restarted
8+
service: name=cds enabled=true state=restarted
99

1010
- name: restart nginx
11-
service: name=nginx enabled=yes state=restarted
11+
service: name=nginx enabled=true state=restarted

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

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
uri:
66
url: https://api.github.com/repos/icpctools/icpctools/releases?per_page=1
77
method: GET
8-
return_content: yes
8+
return_content: true
99
status_code: 200
1010
body_format: json
1111
register: latest_cds_release_array
@@ -52,7 +52,7 @@
5252
copy:
5353
src: /root/CDS-{{ cds_version_minor }}/CDS.war
5454
dest: /home/domjudge/cds/wlp/usr/servers/cds/apps/CDS.war
55-
remote_src: yes
55+
remote_src: true
5656
owner: domjudge
5757
group: domjudge
5858
when: cds_war.stat.exists
@@ -103,28 +103,28 @@
103103

104104
- name: Setup nginx
105105
block:
106-
- name: install nginx
107-
apt:
108-
state: present
109-
pkg:
110-
- nginx
111-
112-
- name: add CDS nginx conf
113-
template:
114-
src: cds.conf.j2
115-
dest: /etc/nginx/sites-available/cds.conf
116-
notify: restart nginx
117-
118-
- name: enable nginx conf for CDS
119-
file:
120-
src: /etc/nginx/sites-available/cds.conf
121-
dest: /etc/nginx/sites-enabled/cds.conf
122-
state: link
123-
notify: restart nginx
124-
125-
- name: disable default nginx site
126-
file:
127-
path: /etc/nginx/sites-enabled/default
128-
state: absent
129-
notify: restart nginx
106+
- name: install nginx
107+
apt:
108+
state: present
109+
pkg:
110+
- nginx
111+
112+
- name: add CDS nginx conf
113+
template:
114+
src: cds.conf.j2
115+
dest: /etc/nginx/sites-available/cds.conf
116+
notify: restart nginx
117+
118+
- name: enable nginx conf for CDS
119+
file:
120+
src: /etc/nginx/sites-available/cds.conf
121+
dest: /etc/nginx/sites-enabled/cds.conf
122+
state: link
123+
notify: restart nginx
124+
125+
- name: disable default nginx site
126+
file:
127+
path: /etc/nginx/sites-enabled/default
128+
state: absent
129+
notify: restart nginx
130130
when: CDS_HOSTNAME is defined

0 commit comments

Comments
 (0)