blancco: CMMC evidence pack, ServiceNow tick list, cloud-upload status

Automates the Blancco parts of the onsite-support CMMC playbook:

- ENT-056/158 evidence pack: /reports/evidence?month=YYYY-MM returns
  ENT-056_<Site>_<YYYY-MM>.zip (summary.csv, README, each report's XML
  and PDF). pxe-blancco-evidence.timer saves last month's pack to the
  reports share's evidence/ folder on the 1st (Persistent).
- ENT-045/159 ServiceNow tick list: /reports/servicenow lists recent
  reports as "Wiped" or "Blancco Wipe failed" with a pre-written
  destruction note, copy buttons and Done (CSRF-protected).
- Cloud upload: blancco-progress.py posts each report's upload result
  ("Sending report document id" -> "Report sent to MC") to
  /reports/cloud-status (CSRF-exempt like /imaging/status); the Reports
  page and the CSVs show it, so a wipe missing from BMP is visible.
- CSV gains failure_reason (exception messages, failed steps, error
  counts), business_location and cloud_upload.
- Preferences: business_location "West Jefferson" (config.BLANCCO_SITE)
  and pdf+xml reports; the report copier now copies the PDF too, named
  after its XML. .part and hidden files are not listed as reports.

State (cloud confirmations, ServiceNow ticks) is a JSON file at
/var/lib/pxe-webapp/blancco-state.json, off the report share.
This commit is contained in:
cproudlock
2026-10-05 13:43:16 -04:00
parent eff956ae6c
commit 44a7eeae95
12 changed files with 590 additions and 26 deletions

View File

@@ -1148,6 +1148,44 @@
enabled: yes
daemon_reload: yes
# Monthly Blancco CMMC evidence pack (ENT-056/158): on the 1st, save last
# month's ZIP to the reports share's evidence/ folder for the tech to copy
# into Box. Persistent catches a run missed while the server was off.
- name: "Create Blancco evidence pack service and timer"
copy:
dest: "/etc/systemd/system/{{ item.name }}"
content: "{{ item.content }}"
loop:
- name: pxe-blancco-evidence.service
content: |
[Unit]
Description=Save last month's Blancco CMMC evidence pack to the reports share
[Service]
Type=oneshot
WorkingDirectory=/opt/pxe-webapp
Environment=BLANCCO_REPORTS=/srv/samba/blancco-reports
Environment=TZ=America/New_York
ExecStart=/usr/bin/python3 /opt/pxe-webapp/blancco_evidence_monthly.py
- name: pxe-blancco-evidence.timer
content: |
[Unit]
Description=Monthly Blancco CMMC evidence pack
[Timer]
OnCalendar=*-*-01 06:00:00
Persistent=true
[Install]
WantedBy=timers.target
- name: "Enable Blancco evidence pack timer"
systemd:
name: pxe-blancco-evidence.timer
state: started
enabled: yes
daemon_reload: yes
- name: "Configure unified Apache site (static files + webapp proxy)"
copy:
dest: /etc/apache2/sites-available/pxe-server.conf