ansible-playbooks/roles/tasks/debian/update.yml

27 lines
624 B
YAML
Raw Normal View History

2024-10-25 17:35:21 +08:00
---
2024-10-25 20:36:12 +08:00
- hosts:
- debian
2024-10-25 17:35:21 +08:00
# Runs on root user already
become: false
tasks:
2024-10-29 01:36:24 +08:00
- name: Update Docker
2024-10-25 17:35:21 +08:00
apt:
2024-10-29 01:36:24 +08:00
name:
- docker
2024-10-25 17:35:21 +08:00
update_cache: true
autoremove: true
state: latest
2024-10-29 01:36:24 +08:00
notify: Restart Docker Containers
- name: Update all packages
apt:
update_cache: false
autoremove: true
state: latest
2024-10-25 17:35:21 +08:00
- name: Update ACME
command: /root/.acme.sh/acme.sh --upgrade --auto-upgrade
2024-10-29 01:36:24 +08:00
handlers:
# Restart Docker Containers on Docker Update
- name: Restart Docker Containers
command: bash "/root/scripts/start_services.sh"