Skip to content

Commit 0d1a7f1

Browse files
nickygerritsenvmcj
authored andcommitted
Use loop instead of with_items in all the places.
1 parent fa3b55b commit 0d1a7f1

File tree

10 files changed

+17
-17
lines changed

10 files changed

+17
-17
lines changed

icpc-wf/ansible/domserver.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
owner: domjudge
8282
group: domjudge
8383
mode: 0755
84-
with_items:
84+
loop:
8585
- htop
8686
- taillog-domserver-nginx-error
8787

@@ -92,5 +92,5 @@
9292
owner: domjudge
9393
group: domjudge
9494
mode: 0755
95-
with_items:
95+
loop:
9696
- taillog-domserver-symfony-error

icpc-wf/ansible/judgehost.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
owner: domjudge
5555
group: domjudge
5656
mode: 0755
57-
with_items:
57+
loop:
5858
- rotate
5959

6060
- name: add autostart shortcuts from template
@@ -64,5 +64,5 @@
6464
owner: domjudge
6565
group: domjudge
6666
mode: 0755
67-
with_items:
67+
loop:
6868
- taillog

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
dest: "/etc/apt/{{ item }}"
77
regexp: 'pc2\.ecs\.baylor\.edu'
88
replace: 'packages'
9-
with_items:
9+
loop:
1010
- sources.list
1111
- sources.list.d/microsoft.list
1212
- sources.list.d/mono.list

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
regexp: '^{{ item }}s'
2525
line: "{{item}}s {{ groups[item] | join(' ') }}"
2626
create: yes
27-
with_items:
27+
loop:
2828
- domserver
2929
- judgehost
3030
- admin

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
value: "{{item.value}}"
2424
owner: domjudge
2525
group: domjudge
26-
with_items:
26+
loop:
2727
- { name: 'email', value: '[email protected]' }
2828
- { name: 'name', value: 'DOMjudge team' }
2929

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
command: phpenmod {{item}}
4444
args:
4545
creates: /etc/php/7.4/fpm/conf.d/20-{{item}}.ini
46-
with_items:
46+
loop:
4747
- zip
4848
- intl
4949

@@ -85,7 +85,7 @@
8585
dest: /etc/php/7.4/fpm/pool.d/domjudge.conf
8686
regexp: "{{item.regexp}}"
8787
line: "{{item.key}} = {{item.value}}"
88-
with_items:
88+
loop:
8989
- { key: 'pm.max_children', regexp: '^pm\.max_children', value: '{{PHP_FPM_MAX_CHILDREN}}' }
9090
- { key: 'pm.max_requests', regexp: '^pm\.max_requests', value: '{{PHP_FPM_MAX_REQUESTS}}' }
9191
- { key: 'php_admin_value[memory_limit]', regexp: '^php_admin_value\[memory_limit\]', value: '{{PHP_MEMORY_LIMIT}}' }

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@
2424
name: "{{ item }}"
2525
state: stopped
2626
enabled: no
27-
with_items:
27+
loop:
2828
- mumble-server
2929
- selfie

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
name="domjudge-judgedaemon@{{item}}"
1616
enabled=yes
1717
state=restarted
18-
with_items: "{{CPUCORE}}"
18+
loop: "{{CPUCORE}}"
1919

2020
- name: update grub
2121
shell: update-grub

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

Lines changed: 3 additions & 3 deletions
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-
with_items: "{{CPUCORE}}"
6+
loop: "{{CPUCORE}}"
77

88
- name: create domjudge-run group
99
group: name=domjudge-run state=present
@@ -68,7 +68,7 @@
6868
remote_src: true
6969
src: "{{DJ_DIR}}/lib/judge/{{item}}.service"
7070
dest: /etc/systemd/system/
71-
with_items:
71+
loop:
7272
- create-cgroups
7373
- domjudge-judgedaemon@
7474
notify:
@@ -80,7 +80,7 @@
8080
command: systemctl mask {{item}}
8181
args:
8282
creates: /etc/systemd/system/{{item}}
83-
with_items:
83+
loop:
8484
- apt-daily-upgrade.timer
8585
- apt-daily.timer
8686
- systemd-tmpfiles-clean.timer

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
owner: domjudge
1717
group: domjudge
1818
mode: 0600
19-
with_items:
19+
loop:
2020
- config
2121
- id_rsa
2222
- id_rsa.pub
@@ -26,7 +26,7 @@
2626
src: "{{ item }}"
2727
dest: /root/.ssh/
2828
mode: 0600
29-
with_items:
29+
loop:
3030
- config
3131
- id_rsa
3232
- id_rsa.pub
@@ -36,6 +36,6 @@
3636
user: "{{ item }}"
3737
state: present
3838
key: "{{ lookup('file', 'id_rsa.pub') }}"
39-
with_items:
39+
loop:
4040
- domjudge
4141
- root

0 commit comments

Comments
 (0)