Skip to content

Commit 91ab56d

Browse files
committed
Fix ansible linting issues
1 parent 4154a9b commit 91ab56d

File tree

42 files changed

+237
-238
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+237
-238
lines changed

provision-contest/ansible/admin.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
# This playbook an admin machine with a dev DOMjudge instance
33

4-
- name: setup admin machines
4+
- name: Setup admin machines
55
hosts: admin
66
vars:
77
host_type: admin
@@ -44,7 +44,7 @@
4444
handlers:
4545
- include: handlers.yml
4646
tasks:
47-
- name: install common required/useful packages
47+
- name: Install common required/useful packages
4848
tags: packages
4949
apt:
5050
state: present
@@ -54,32 +54,32 @@
5454
- makepasswd
5555
- mmv
5656

57-
- name: enable developer mode
57+
- name: Enable developer mode
5858
lineinfile:
5959
regexp: 'APP_ENV='
6060
line: 'APP_ENV=dev'
6161
dest: "{{ DJ_DIR }}/webapp/.env.local"
6262
create: true
6363

64-
- name: add cds to hosts file
64+
- name: Add cds to hosts file
6565
lineinfile:
6666
dest: /etc/hosts
6767
regexp: 'cds$'
6868
line: "10.3.3.207 cds"
6969

70-
- name: add kattis to hosts file
70+
- name: Add kattis to hosts file
7171
lineinfile:
7272
dest: /etc/hosts
7373
regexp: 'kattis$'
7474
line: "10.3.3.212 kattis"
7575

76-
- name: add domjudge-laptop to hosts file
76+
- name: Add domjudge-laptop to hosts file
7777
lineinfile:
7878
dest: /etc/hosts
7979
regexp: 'domjudge-laptop$'
8080
line: "10.3.3.200 domjudge-laptop"
8181

82-
- name: add nisprint to hosts file
82+
- name: Add nisprint to hosts file
8383
lineinfile:
8484
dest: /etc/hosts
8585
regexp: 'printsrv$'
@@ -89,25 +89,25 @@
8989
set_fact:
9090
dj_git_repo_scripts: "{{ DJ_GIT_REPO_SCRIPTS_RESTRICTED if WF_RESTRICTED_NETWORK else DJ_GIT_REPO_SCRIPTS }}"
9191

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

98-
- name: create working copy of the wf2020 repo
98+
- name: Create working copy of the wf2020 repo
9999
become: true
100100
become_user: domjudge
101101
git: repo=git@cds:wf2020 dest=/home/domjudge/wf2020 version=master accept_hostkey=yes update=no
102102

103-
- name: copy custom CSS file for admin machines
103+
- name: Copy custom CSS file for admin machines
104104
copy:
105105
src: admin-machine.css
106106
dest: "{{ DJ_DIR }}/webapp/public/css/custom/admin-machine.css"
107107
owner: domjudge
108108
group: domjudge
109109
mode: 0644
110-
notify: clear application cache
110+
notify: Clear application cache
111111

112112
- name: Install netrc file
113113
template:

provision-contest/ansible/cds.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
# This playbook installs the CDS
33

4-
- name: setup CDS
4+
- name: Setup CDS
55
hosts: cds
66
vars:
77
host_type: cds

provision-contest/ansible/domserver.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
# This playbook installs the DOMjudge server(s)
33

4-
- name: setup domserver
4+
- name: Setup domserver
55
hosts: domserver
66
vars:
77
host_type: domserver
@@ -50,27 +50,27 @@
5050
handlers:
5151
- include: handlers.yml
5252
tasks:
53-
- name: install domserver required packages
53+
- name: Install domserver required packages
5454
apt:
5555
state: present
5656
pkg:
5757
- python3-mysqldb
5858
- macchanger
5959
- molly-guard
6060

61-
- name: disable developer mode
61+
- name: Disable developer mode
6262
lineinfile:
6363
regexp: '^APP_ENV=dev'
6464
state: absent
6565
dest: "{{ DJ_DIR }}/webapp/.env.local"
6666

67-
- name: install contest images
67+
- name: Install contest images
6868
synchronize:
6969
src: files/domjudge-public/
7070
dest: "{{ DJ_DIR }}/webapp/public"
7171
owner: false
7272
use_ssh_args: true
73-
notify: clear application cache
73+
notify: Clear application cache
7474

7575
- name: Add documentation in DOMjudge team interface
7676
copy:
@@ -79,9 +79,9 @@
7979
mode: 0644
8080
group: root
8181
owner: root
82-
notify: clear application cache
82+
notify: Clear application cache
8383

84-
- name: add autostart shortcuts
84+
- name: Add autostart shortcuts
8585
copy:
8686
src: files/{{ item }}.desktop
8787
dest: /home/domjudge/.config/autostart/
@@ -92,7 +92,7 @@
9292
- htop
9393
- taillog-domserver-nginx-error
9494

95-
- name: add autostart shortcuts from template
95+
- name: Add autostart shortcuts from template
9696
template:
9797
src: files/{{ item }}.desktop.j2
9898
dest: /home/domjudge/.config/autostart/{{ item }}.desktop
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
# Common definition of handlers
22
---
3-
- name: clear application cache
3+
- name: Clear application cache
44
command: "{{ DJ_DIR }}/webapp/bin/console cache:clear"
55
become: true
66
become_user: domjudge
77

8-
- name: rebuild domjudge
8+
- name: Rebuild domjudge
99
become: true
1010
become_user: domjudge
1111
make:
1212
chdir: "{{ DJ_DIR }}"
1313
target: inplace-install
14-
notify: fix permissions on domjudge inplace-install
14+
notify: Fix permissions on domjudge inplace-install
1515

16-
- name: restart nginx
16+
- name: Restart nginx
1717
systemd:
1818
name: nginx
1919
enabled: true
2020
state: restarted
21-

provision-contest/ansible/judgehost.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
# This playbook installs the DOMjudge judgehosts
33

4-
- name: setup judgehost
4+
- name: Setup judgehost
55
hosts: judgehost
66
# We always leave 2/3 of the judges online
77
serial:
@@ -60,7 +60,7 @@
6060
with_sequence: start=0 end={{ ansible_processor_vcpus }} format=domjudge-judgedaemon@%1x
6161
when: service_file.stat.exists
6262
tasks:
63-
- name: add autostart shortcuts
63+
- name: Add autostart shortcuts
6464
template:
6565
src: files/{{ item }}.desktop
6666
dest: /home/domjudge/.config/autostart/
@@ -71,7 +71,7 @@
7171
- rotate
7272
when: GRAPHICAL
7373

74-
- name: add autostart shortcuts from template
74+
- name: Add autostart shortcuts from template
7575
template:
7676
src: files/{{ item }}.desktop.j2
7777
dest: /home/domjudge/.config/autostart/{{ item }}.desktop

provision-contest/ansible/mgmt.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
# This playbook installs the Management machine
33

4-
- name: setup management
4+
- name: Setup management
55
hosts: mgmt
66
vars:
77
host_type: mgmt
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
2-
- name: run apt update
2+
- name: Run apt update
33
apt:
44
update_cache: true
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
# Install a single local DEB package.
22
---
3-
- name: create temp package directory
3+
- name: Create temp package directory
44
file:
55
path: /tmp/dj_ansible
66
state: directory
77
owner: root
88
group: root
99
mode: 0700
1010

11-
- name: copy DEB package to remote
11+
- name: Copy DEB package to remote
1212
synchronize:
1313
src: "{{ item }}"
1414
dest: "/tmp/dj_ansible/{{ item | basename }}"
1515

16-
- name: install DEB package {{ item | basename }}
16+
- name: Install DEB package {{ item | basename }}
1717
apt:
1818
deb: "/tmp/dj_ansible/{{ item | basename }}"
1919
state: present

provision-contest/ansible/roles/base_packages/tasks/main.yml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
---
22
# This task configures packaging and installs various system utilities
33

4-
- block:
5-
- name: replace pc2.ecs.baylor.edu by packages in apt sources
4+
- name: World finals fixes for apt sources
5+
block:
6+
- name: Replace pc2.ecs.baylor.edu by packages in apt sources
67
replace:
78
dest: "/etc/apt/{{ item }}"
89
regexp: 'pc2\.ecs\.baylor\.edu'
@@ -13,44 +14,44 @@
1314
- sources.list.d/mono.list
1415
- sources.list.d/vscode.list
1516
- sources.list.d/pypy-ubuntu-ppa-buster.list
16-
notify: run apt update
17+
notify: Run apt update
1718

18-
- name: add packages to hosts file
19+
- name: Add packages to hosts file
1920
lineinfile:
2021
dest: /etc/hosts
2122
regexp: '^10\.3\.3\.209'
2223
line: "10.3.3.209 packages"
23-
notify: run apt update
24+
notify: Run apt update
2425

25-
- name: remove pycharm repo
26+
- name: Remove pycharm repo
2627
replace:
2728
dest: /etc/apt/sources.list
2829
regexp: '^([^#].*pycharm.*)$'
2930
replace: '# \1'
30-
notify: run apt update
31+
notify: Run apt update
3132
when: ICPC_IMAGE and WF_RESTRICTED_NETWORK
3233

33-
- name: check for dpkg architecture i386
34+
- name: Check for dpkg architecture i386
3435
command: dpkg --print-foreign-architectures
3536
register: dpkg_architectures
3637
changed_when: false
3738

38-
- name: remove unused dpkg architecture i386
39+
- name: Remove unused dpkg architecture i386
3940
command: dpkg --remove-architecture i386
40-
notify: run apt update
41+
notify: Run apt update
4142
when: dpkg_architectures.stdout.find('i386') != -1
4243

43-
- name: flush handlers
44+
- name: Flush handlers
4445
meta: flush_handlers
4546

46-
- name: remove some packages
47+
- name: Remove some packages
4748
apt:
4849
state: absent
4950
pkg:
5051
- apport
5152
- ntp
5253

53-
- name: install common required/useful packages
54+
- name: Install common required/useful packages
5455
apt:
5556
state: present
5657
pkg:
@@ -122,7 +123,7 @@
122123
command: php /root/composer-setup.php --install-dir=/usr/local/bin --filename=composer
123124
when: not composer_file.stat.exists
124125

125-
- name: install local DEB packages
126+
- name: Install local DEB packages
126127
include: install-local-package.yml
127128
with_fileglob:
128129
- install-{{ host_type }}/*.deb

provision-contest/ansible/roles/cds/handlers/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
- name: restart cds
2+
- name: Restart cds
33
systemd:
44
name: cds
55
enabled: true

0 commit comments

Comments
 (0)