Skip to content

Commit

Permalink
schedule nightly reboot of vps server
Browse files Browse the repository at this point in the history
  • Loading branch information
artyorsh committed Sep 11, 2024
1 parent ff07077 commit 5f455a7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions playbook-vps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,8 @@
- role: "artyorsh.selfhosted.nginx"
tags:
- "nginx"

tasks:
- ansible.builtin.import_tasks: "tasks/scheduled-reboot.yml"
tags:
- "reboot"
8 changes: 8 additions & 0 deletions tasks/scheduled-reboot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
- name: "Ensure reboot at 6AM is present in crontab"
ansible.builtin.cron:
name: "Nightly reboot (performance maintenance)"
user: "{{ ansible_user }}"
job: "/sbin/shutdown -r now"
minute: "0"
hour: "6"

0 comments on commit 5f455a7

Please sign in to comment.