Fix(judgehost): works with Debian12 + docker
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
---
|
||||
- name: Reboot
|
||||
ansible.builtin.reboot: {}
|
||||
- name: Update grub
|
||||
ansible.builtin.command: |
|
||||
update-grub
|
||||
changed_when: true
|
||||
- name: Restart judgehost docker compose
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: "{{ domjudge_base_dir }}"
|
||||
|
||||
@@ -1,10 +1,23 @@
|
||||
---
|
||||
- name: Add boot parameters
|
||||
- name: Add boot parameters (Archlinux)
|
||||
ansible.builtin.lineinfile:
|
||||
path: /boot/loader/entries/arch.conf
|
||||
line: >-
|
||||
options cgroup_enable=memory
|
||||
notify: Reboot
|
||||
when: ansible_facts['distribution'] == "Archlinux"
|
||||
- name: Add boot parameters (Debian)
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/default/grub
|
||||
regexp: '^GRUB_CMDLINE_LINUX_DEFAULT='
|
||||
line: >-
|
||||
GRUB_CMDLINE_LINUX_DEFAULT="quiet
|
||||
cgroup_enable=memory swapaccount=1 isolcpus=0
|
||||
systemd.unified_cgroup_hierarchy=0"
|
||||
notify:
|
||||
- Update grub
|
||||
- Reboot
|
||||
when: ansible_facts['distribution'] == "Debian"
|
||||
- name: Flush handlers
|
||||
ansible.builtin.meta: flush_handlers
|
||||
|
||||
|
||||
Reference in New Issue
Block a user