Skip to content

Commit

Permalink
refactor: override _run in RunPlaybook
Browse files Browse the repository at this point in the history
Re-establishes a single log message of "Calling Ansible runner" rather than one per iteration.

Signed-off-by: Joe Shimkus <[email protected]>
  • Loading branch information
jshimkus-rh committed Oct 27, 2023
1 parent f21c224 commit acb6534
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ansible_rulebook/action/run_playbook.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,11 @@ async def __call__(self):
if os.path.exists(self.private_data_dir):
shutil.rmtree(self.private_data_dir)

async def _do_run(self) -> bool:
async def _run(self):
logger.info("Calling Ansible runner")
await super()._run()

async def _do_run(self) -> bool:
await Runner(
self.private_data_dir,
self.host_limit,
Expand Down

0 comments on commit acb6534

Please sign in to comment.