Skip to content

Commit b76317d

Browse files
Michael Vasseurvmcj
authored andcommitted
Only download repos in restricted WF network
In case we ever want to deploy a contest where we do have internet.
1 parent e05fd23 commit b76317d

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

provision-contest/ansible/admin.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,19 @@
6969
set_fact:
7070
dj_git_repo_scripts: "{{ DJ_GIT_REPO_SCRIPTS_RESTRICTED if WF_RESTRICTED_NETWORK else DJ_GIT_REPO_SCRIPTS }}"
7171

72-
- name: Create working copy of the domjudge-scripts repo
73-
become: true
74-
become_user: domjudge
75-
# We use a different directory here to have one single 'upstream' and not have issues with it
76-
git: repo={{ dj_git_repo_scripts }} dest=/home/domjudge/domjudge-scripts-checkout version=main accept_hostkey=yes update=no
72+
- name: Download offline repos
73+
when: WF_RESTRICTED_NETWORK
74+
block:
75+
- name: Create working copy of the domjudge-scripts repo
76+
become: true
77+
become_user: domjudge
78+
# We use a different directory here to have one single 'upstream' and not have issues with it
79+
git: repo={{ dj_git_repo_scripts }} dest=/home/domjudge/domjudge-scripts-checkout version=main accept_hostkey=yes update=no
7780

78-
- name: Create working copy of the wf2021 repo
79-
become: true
80-
become_user: domjudge
81-
git: repo=git@cds:wf2021 dest=/home/domjudge/wf2021 version=master accept_hostkey=yes update=no
81+
- name: Create working copy of the wf2021 repo
82+
become: true
83+
become_user: domjudge
84+
git: repo=git@cds:wf2021 dest=/home/domjudge/wf2021 version=master accept_hostkey=yes update=no
8285

8386
- name: Copy custom CSS file for admin machines
8487
copy:

0 commit comments

Comments
 (0)