Jenkins Build - SS67/project-docs GitHub Wiki
AAP 2.6 native. Windows and Linux. Replaces the Jenkins orchestration plan.
| Question | Decision | Reason |
|---|---|---|
| Orchestrator | AAP, not Jenkins | Inventory, Vault creds and child workflows already live there |
| Discovery source | vSphere dynamic inventory | Already syncing every 15 min |
| Lookup key | vm_guest_hostname | Webhook caller knows OS hostname, not vSphere VM name |
| OS classification | vm_guest_full_name | vm_guest_os reports the configured guest ID and lies |
| Domain detection | Auth success with domain service account | Real evidence. DNS lookup only proves a record exists |
| Approved domains | dev.company.com, idm.dev.company.com | Prod removed from scope entirely |
| Human approval | None in pipeline | Running the bootstrap script is the consent |
| Bootstrap credential | Random per host, Vault KV v2 | Shared static password is one host away from estate wide compromise |
| Compliance evidence | Host side, single collection job | One AAP launch per run, not one per control |
| vm_attr_* fields | Hints only, never proof | Likely written by our own workflows, so validating against them is circular |
Final status values: compliant, remediated, partial, failed, join_unverified, remediation_unverified, host_not_in_inventory.
vm-compliance-orchestrator/
โโโ ansible.cfg jinja2_native=True
โโโ collections/requirements.yml
โโโ inventory/ uses existing vSphere source
โโโ playbooks/
โ โโโ orchestrate.yml entry point, webhook target
โ โโโ discover.yml inventory lookup + OS classify
โ โโโ preflight.yml all guards
โ โโโ domain_join.yml routes windows vs linux
โ โโโ collect_evidence.yml single pass, all controls
โ โโโ remediate.yml conditional child launches
โ โโโ cleanup.yml always runs
โ โโโ report.yml
โโโ roles/
โ โโโ bootstrap_credential/
โ โ โโโ tasks/
โ โ โโโ main.yml fetch from Vault, set conn vars
โ โ โโโ destroy.yml account removal + Vault destroy
โ โโโ host_discovery/
โ โ โโโ tasks/main.yml lookup, retry, classify
โ โโโ domain_join/
โ โ โโโ defaults/main.yml approved domain map
โ โ โโโ tasks/
โ โ โโโ main.yml routing
โ โ โโโ preflight.yml
โ โ โโโ windows.yml win_domain_membership + reboot
โ โ โโโ linux.yml ipaclient
โ โ โโโ verify.yml independent confirmation
โ โโโ compliance_evidence/
โ โ โโโ defaults/main.yml thresholds, control enable flags
โ โ โโโ tasks/
โ โ โ โโโ main.yml assembles controls dict
โ โ โ โโโ defender_windows.yml
โ โ โ โโโ defender_linux.yml
โ โ โ โโโ rapid7_windows.yml
โ โ โ โโโ rapid7_linux.yml
โ โ โ โโโ sccm.yml windows only
โ โ โ โโโ wsus.yml windows standalone only
โ โ โ โโโ aap.yml
โ โ โโโ vars/main.yml service names, registry paths
โ โโโ compliance_evaluate/
โ โ โโโ tasks/main.yml one rule applied to all controls
โ โโโ local_account/
โ โโโ tasks/
โ โโโ windows.yml
โ โโโ linux.yml
โโโ templates/
โ โโโ compliance_report.json.j2
โโโ scripts/
โโโ bootstrap_windows.ps1 user runs on target VM
โโโ bootstrap_linux.sh
Job templates:
VMC Discover
VMC Preflight
VMC Domain Join
VMC Collect Evidence
VMC Evaluate
VMC Cleanup
VMC Report
Workflow template VMC Orchestrate chains them. Existing onboarding workflows attach as child nodes off the evaluate result. Enable webhook on the workflow, not on individual templates.
Credentials:
Vault Bootstrap AppRole existing pattern, extend it
AD Join Custom vault path secret/infra/dev/ad_join
IdM Join Custom vault path secret/infra/dev/idm_join
Every input source binding sets Path to Auth = approle. Skip it and default_auth_path KeyError fires silently.
Join accounts get create computer object on the target OU only. Not domain admin.
Instance group: default is fine. Nothing here depends on local disk state.
-
compliance_evidencerole and job template. Read only, no writes. Run against 20 hosts and tune the health indicators. This also tells you how wrong thevm_attr_*values are. - Discovery and classification. Report only across the estate. No remediation yet.
- Bootstrap script rewrite: random password on Windows to match the Linux ephemeral key model.
- Wire remediation for one control. Rapid7 first, low blast radius.
- Domain join port from Jenkins, run alongside the existing pipeline in report only mode until trusted.
- Remaining controls.
- Retire the Jenkins pipeline.
Steps 1 and 2 give a full compliance picture before anything on a host changes.
- Bootstrap script currently uses a fixed Windows password. Same value everywhere it has ever run. Fix in step 3.
- AAP Onboarding as a workflow may not exist. If the vSphere dynamic inventory already picks up every VM, it is a validation check, not a remediation. Confirm what it does today.
- Rapid7 has no
vm_attr_*equivalent. Host side check only. - Rotation job template for standalone and custom domain hosts. Per host value, not shared. Not MVP, but add the group now so it has a target.
- A host joined to a different domain looks identical to standalone from an auth failure. Accepted for dev scope. Do not carry the assumption anywhere near prod.
- Report retention on evidence artifacts. Currently unbounded.