diff --git a/ansible/inventories/snarfnet.yml b/ansible/inventories/snarfnet.yml index 3b4790f..23827a9 100644 --- a/ansible/inventories/snarfnet.yml +++ b/ansible/inventories/snarfnet.yml @@ -81,3 +81,4 @@ all: hosts: sn_nas: { ansible_host: 14.10.10.71 } snarfnas: { ansible_host: 14.10.10.72 } + diff --git a/ansible/playbooks/daily_drift_audit.yml b/ansible/playbooks/daily_drift_audit.yml index 36cd9d4..f38244f 100644 --- a/ansible/playbooks/daily_drift_audit.yml +++ b/ansible/playbooks/daily_drift_audit.yml @@ -4,10 +4,10 @@ gather_facts: false tasks: - name: Audit system time sync status - ansible.builtin.command: timedatectl show -p NTPSynchronized --value + ansible.builtin.shell: systemctl is-active systemd-timesyncd || systemctl is-active chrony || systemctl is-active chronyd register: time_sync changed_when: false - failed_when: time_sync.stdout != "yes" + failed_when: time_sync.stdout != "active" - name: Audit Zabbix Agent 2 service status ansible.builtin.command: systemctl is-active zabbix-agent2 @@ -24,3 +24,4 @@ - name: Display host audit status ansible.builtin.debug: msg: "{{ inventory_hostname }} ({{ ansible_host }}) [OK]: TimeSync={{ time_sync.stdout }}, Zabbix={{ zabbix_status.stdout }}, SSHKey=Verified" + diff --git a/ansible/playbooks/k3s_aerodrome_precheck.yml b/ansible/playbooks/k3s_aerodrome_precheck.yml index 26f1619..14eaf17 100644 --- a/ansible/playbooks/k3s_aerodrome_precheck.yml +++ b/ansible/playbooks/k3s_aerodrome_precheck.yml @@ -27,3 +27,4 @@ ansible.builtin.debug: msg: "{{ etcd_snap.stdout_lines }}" when: inventory_hostname == "sninfr2lnxctl01" + diff --git a/ansible/playbooks/weekly_os_patching.yml b/ansible/playbooks/weekly_os_patching.yml index 45cd58a..e3d8f7f 100644 --- a/ansible/playbooks/weekly_os_patching.yml +++ b/ansible/playbooks/weekly_os_patching.yml @@ -44,3 +44,4 @@ name: zabbix-agent2 state: started ignore_errors: true + diff --git a/scripts/audit_awx.py b/scripts/audit_awx.py index 503237e..52be976 100644 --- a/scripts/audit_awx.py +++ b/scripts/audit_awx.py @@ -47,3 +47,4 @@ try: except Exception as e: print("AWX Query Error:", e) + diff --git a/scripts/check_awx_admin.py b/scripts/check_awx_admin.py index 9567e34..09503c5 100644 --- a/scripts/check_awx_admin.py +++ b/scripts/check_awx_admin.py @@ -11,3 +11,4 @@ stdin, stdout, stderr = ssh.exec_command("kubectl get secret awx-admin-password print("ADMIN PASSWORD:\n", stdout.read().decode()) ssh.close() + diff --git a/scripts/check_zabbix_problems.py b/scripts/check_zabbix_problems.py index 67f1185..6e15be7 100644 --- a/scripts/check_zabbix_problems.py +++ b/scripts/check_zabbix_problems.py @@ -17,3 +17,4 @@ with urllib.request.urlopen(req, timeout=10, context=ctx) as r: print(f"Total Active Problems in Zabbix: {len(problems)}") for p in problems: print(f" - [Severity {p['severity']}] {p['name']}") + diff --git a/scripts/inspect_awx_orm.py b/scripts/inspect_awx_orm.py index 09b44bd..54cb2eb 100644 --- a/scripts/inspect_awx_orm.py +++ b/scripts/inspect_awx_orm.py @@ -36,3 +36,4 @@ print(stdout.read().decode()) print(stderr.read().decode()) ssh.close() + diff --git a/scripts/register_nas_zabbix.py b/scripts/register_nas_zabbix.py index 9ea9e40..515f851 100644 --- a/scripts/register_nas_zabbix.py +++ b/scripts/register_nas_zabbix.py @@ -59,3 +59,4 @@ for nas in nas_devices: print(f"{nas['name']} is already registered.") print("All NAS devices registered in Zabbix!") + diff --git a/scripts/retry_deploy_zabbix.py b/scripts/retry_deploy_zabbix.py index 57ba313..3460dbc 100644 --- a/scripts/retry_deploy_zabbix.py +++ b/scripts/retry_deploy_zabbix.py @@ -68,3 +68,4 @@ for name, ip, user in TARGETS: ssh.close() except Exception as e: print(f" [ERROR] Failed on {name} ({ip}): {e}") + diff --git a/scripts/setup_awx_resources.py b/scripts/setup_awx_resources.py index d1141f7..9c990fd 100644 --- a/scripts/setup_awx_resources.py +++ b/scripts/setup_awx_resources.py @@ -181,3 +181,4 @@ print(stdout.read().decode()) print(stderr.read().decode()) ssh.close() +