diff --git a/playbooks/system-maintenance.yml b/playbooks/system-maintenance.yml deleted file mode 100644 index bf58955..0000000 --- a/playbooks/system-maintenance.yml +++ /dev/null @@ -1,41 +0,0 @@ ---- -- name: System Maintenance Tasks - hosts: all - become: yes - tasks: - - name: Update package repositories - apt: - update_cache: yes - - - name: Install security updates - apt: - upgrade: dist - - - name: Clean temporary files - file: - path: /tmp - state: absent - notify: Recreate /tmp - - - name: Restart services if needed - shell: | - needs_restart=$(needs-restarting || true) - if [ -n "$needs_restart" ]; then - systemctl restart apache2 - fi - when: ansible_os_family == "Debian" - - - name: Generate system health report - shell: | - echo "System Health Report - $(date)" > /var/log/system_health.log - uptime >> /var/log/system_health.log - df -h >> /var/log/system_health.log - free -m >> /var/log/system_health.log - register: health_report - - handlers: - - name: Recreate /tmp - file: - path: /tmp - state: directory - mode: '1777'