feat(infra): Phase 3 & 4 completion, deploy AWX playbooks & Zabbix monitoring

This commit is contained in:
2026-11-02 04:17:38 -05:00
parent 9c3de8bb4d
commit 003ae80c9c
15 changed files with 711 additions and 2 deletions

View File

@@ -0,0 +1,26 @@
---
- name: Daily Infrastructure Health & Configuration Drift Audit
hosts: all:!synology_nas
gather_facts: false
tasks:
- name: Audit system time sync status
ansible.builtin.command: timedatectl show -p NTPSynchronized --value
register: time_sync
changed_when: false
failed_when: time_sync.stdout != "yes"
- name: Audit Zabbix Agent 2 service status
ansible.builtin.command: systemctl is-active zabbix-agent2
register: zabbix_status
changed_when: false
failed_when: zabbix_status.stdout != "active"
- name: Audit unified SSH key enrollment in authorized_keys
ansible.builtin.shell: grep -q "snarfnet-automation-master@snarfnet.net" ~/.ssh/authorized_keys
register: ssh_key_check
changed_when: false
failed_when: ssh_key_check.rc != 0
- name: Display host audit status
ansible.builtin.debug:
msg: "{{ inventory_hostname }} ({{ ansible_host }}) [OK]: TimeSync={{ time_sync.stdout }}, Zabbix={{ zabbix_status.stdout }}, SSHKey=Verified"