Description of problem: Embedded Ansible runs do not clean up the temp directory on completion Version-Release number of selected component (if applicable): 5.11.0 How reproducible: 100% Steps to Reproduce: 1. Run an Embedded Ansible job Actual results: Temp dir still contains the source checkout Expected results: Temp dir does not contain the source checkout
https://github.com/ManageIQ/manageiq/pull/19145
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/aa334b5d297dfb8826b819f4791d29f672ba59cf commit aa334b5d297dfb8826b819f4791d29f672ba59cf Author: Jason Frey <jfrey> AuthorDate: Tue Aug 13 14:51:56 2019 -0400 Commit: Jason Frey <jfrey> CommitDate: Tue Aug 13 14:51:56 2019 -0400 Cleanup the temporary checkout created by Embedded Ansible runs This moves the knowledge of creation and destruction of the temporary directory into the AnsibleRunnerWorkflow. AnsibleRunnerWorkflow now supports both a direct playbook_path (for on-disk playbooks) or a configuration_script_source_id + playbook_relative_path pair of options. If that pair is present, then the workflow knows it must checkout the git repository contents first, and then later clean it up. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1741631 app/models/manageiq/providers/ansible_playbook_workflow.rb | 13 + app/models/manageiq/providers/ansible_role_workflow.rb | 17 + app/models/manageiq/providers/ansible_runner_workflow.rb | 49 +- app/models/manageiq/providers/embedded_ansible/automation_manager/configuration_script.rb | 12 +- spec/models/manageiq/providers/ansible_playbook_workflow_spec.rb | 86 +- spec/models/manageiq/providers/ansible_role_workflow_spec.rb | 91 +- spec/models/manageiq/providers/embedded_ansible/automation_manager/configuration_script_spec.rb | 7 +- 7 files changed, 243 insertions(+), 32 deletions(-)
New commit detected on ManageIQ/manageiq/ivanchuk: https://github.com/ManageIQ/manageiq/commit/330d3327c8010dbe57fb9912ff8a78dd3d8af02e commit 330d3327c8010dbe57fb9912ff8a78dd3d8af02e Author: Nick Carboni <ncarboni> AuthorDate: Thu Aug 15 14:52:04 2019 -0400 Commit: Nick Carboni <ncarboni> CommitDate: Thu Aug 15 14:52:04 2019 -0400 Merge pull request #19145 from Fryguy/cleanup_git_repository_after_ansible_runner_workflow Cleanup the temporary checkout created by Embedded Ansible runs (cherry picked from commit e9a1b4144b0d1d745ac1b3791a703cb001dbc3dc) https://bugzilla.redhat.com/show_bug.cgi?id=1741631 app/models/manageiq/providers/ansible_playbook_workflow.rb | 13 + app/models/manageiq/providers/ansible_role_workflow.rb | 17 + app/models/manageiq/providers/ansible_runner_workflow.rb | 49 +- app/models/manageiq/providers/embedded_ansible/automation_manager/configuration_script.rb | 12 +- spec/models/manageiq/providers/ansible_playbook_workflow_spec.rb | 86 +- spec/models/manageiq/providers/ansible_role_workflow_spec.rb | 91 +- spec/models/manageiq/providers/embedded_ansible/automation_manager/configuration_script_spec.rb | 7 +- 7 files changed, 243 insertions(+), 32 deletions(-)
After playbook execution finished without error. Able to see the directory is being cleaned up properly. Verified Version: 5.11.0.21.20190821214526_b0060d0