Skip to content

Small fixes #173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions provision-contest/ansible/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,33 +29,33 @@ VENDOR=
else
VENDOR=roles/domjudge_checkout/files/webapp/vendor
$(VENDOR): $(VENDORTGZ)
-cd roles/domjudge_checkout/files/webapp && tar xzf ../$(notdir $<)
-mkdir -p roles/domjudge_checkout/files/webapp && cd roles/domjudge_checkout/files/webapp && tar xzf ../$(notdir $<)
endif

ROLES=domserver judgehost admin grafana cds presclient presadmin scoreboard mgmt autoanalyst
$(ROLES): %: %.yml hosts group_vars/all/secret.yml $(VENDOR) $(SSHKEY) $(SSHKEY).pub
ansible-playbook -i hosts $<
ansible-playbook $<

FAILED_ROLES=$(addprefix failed-,$(ROLES))
$(FAILED_ROLES): failed-%: %.yml %.retry
ansible-playbook -i hosts --limit @$*.retry $<
ansible-playbook --limit @$*.retry $<

CODEONLY_ROLES=$(addprefix codeonly-,domserver judgehost admin)
$(CODEONLY_ROLES): codeonly-%:
ansible-playbook -i hosts --tags pretask,domjudge_build $*.yml
ansible-playbook --tags pretask,domjudge_build $*.yml

powerloss:
ansible-playbook -i hosts emergency.yml --tags powerloss
ansible-playbook emergency.yml --tags powerloss

lockdown:
ansible-playbook -i hosts emergency.yml --tags full_lockdown
ansible-playbook emergency.yml --tags full_lockdown

lockdown-force:
ansible-playbook -i hosts emergency.yml --tags full_lockdown,force_lockdown
ansible-playbook emergency.yml --tags full_lockdown,force_lockdown

ansible-master:
for book in $(ROLES) ; do \
ansible-playbook -i hosts $$book.yml --tags install_master ; \
ansible-playbook $$book.yml --tags install_master ; \
done

admin: $(SSL_LOCALHOST_FILES)
Expand Down
1 change: 1 addition & 0 deletions provision-contest/ansible/admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
state: present
pkg:
- ansible
- ansible-lint
- git-gui
- gitk
- makepasswd
Expand Down
1 change: 1 addition & 0 deletions provision-contest/ansible/ansible.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ system_warnings = True
strategy = free
retry_files_enabled = True
retry_files_save_path = ~/.ansible-retry
inventory = hosts

[connection]
ssh_args = -C -o ControlMaster=auto -o ControlPersist=60s
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/lib
/lib-vendor.tgz
/vendor.tgz
/webapp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ scrape_configs:
- {{ hostvars[host].ansible_host }}:9100
{% endfor %}
{% endif %}
{% if groups["domserver"][0] is defined %}
- job_name: {{ group_prefix ~ domjudge }}
{% if groups[group_prefix+"domserver"][0] is defined %}
- job_name: {{ group_prefix ~ 'domjudge' }}
basic_auth:
username: admin
password: {{ ADMIN_PASSWORD }}
Expand Down
Loading