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
32 lines
720 B
YAML
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
|