Files
ansible-config/playbooks/infrastructure/01-system-update.yml
Freazzzing 30d35bc401 Initial commit: Ansible configuration for monitoring stack
Contains:
- Production inventory (inventories/production/hosts)
- VictoriaMetrics installation (playbooks/monitoring/install_victoriametrics.yml)
- Vault setup and secrets management (playbooks/vault/)
- Base system configuration (playbooks/infrastructure/)
- Directory structure for monitoring components
2026-02-02 11:22:24 +00:00

32 lines
720 B
YAML

---
- name: System update and cleanup
hosts: all_except_ansible
become: yes
tasks:
- name: Stop unattended upgrades
systemd:
name: unattended-upgrades
state: stopped
- name: Clean any apt locks
shell: |
pkill -9 apt-get apt dpkg 2>/dev/null || true
rm -f /var/lib/apt/lists/lock /var/lib/dpkg/lock*
dpkg --configure -a 2>/dev/null || true
ignore_errors: yes
- name: Update apt cache
apt:
update_cache: yes
cache_valid_time: 86400
- name: Upgrade system packages
apt:
upgrade: safe
autoremove: yes
- name: Clean apt cache
apt:
autoclean: yes