Skip to content

Instantly share code, notes, and snippets.

@harlowja
Created March 14, 2018 18:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harlowja/6ab3c73588d117edb2dde7fb02d02d79 to your computer and use it in GitHub Desktop.
Save harlowja/6ab3c73588d117edb2dde7fb02d02d79 to your computer and use it in GitHub Desktop.
use ara;
DELETE FROM task_results WHERE task_id IN (SELECT id FROM tasks WHERE file_id IN (SELECT id FROM files WHERE playbook_id='e2d47b03-31b7-4665-b9c8-ae7a9b987fed'))
DELETE FROM tasks WHERE file_id IN (SELECT id FROM files WHERE playbook_id='e2d47b03-31b7-4665-b9c8-ae7a9b987fed')
DELETE FROM files WHERE playbook_id='e2d47b03-31b7-4665-b9c8-ae7a9b987fed'
DELETE FROM hosts WHERE playbook_id='e2d47b03-31b7-4665-b9c8-ae7a9b987fed'
DELETE FROM plays WHERE playbook_id='e2d47b03-31b7-4665-b9c8-ae7a9b987fed'
DELETE FROM playbooks WHERE id='e2d47b03-31b7-4665-b9c8-ae7a9b987fed'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment