Automate SSH user provisioning and removal with Ansible
Build a workflow triggered by a request specifying the action (add or remove), username, target host group, and public key where relevant. Call Ansible (Tower/AWX API or a runner) to execute the matching playbook against the inventory. Validate inputs, confirm the playbook run status, and surface stdout/errors. Retry on transient failures, fail safe if the host group is unknown, and require approval for privileged or production hosts. Output the playbook result and which hosts were changed.
What this prompt builds
Add or remove SSH accounts across your servers by triggering Ansible playbooks from a single workflow.
The problem
Managing SSH access by hand across a fleet of Linux hosts is error-prone and slow, and stale accounts are a common way attackers move laterally. Tracking who has shell access where is nearly impossible without automation.
Solution and impact
This workflow drives Ansible playbooks to create or remove SSH users consistently across target hosts from one request. Access changes become uniform and logged, eliminating drift and forgotten accounts.