add function to run ansible playbook#22
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new --run-ansible-playbook argument to both the create and run commands, allowing users to execute a specified Ansible playbook. However, a security vulnerability was identified in the run_ansible_playbook function: the call to get_path is currently a no-op because its return value is ignored, and passing the unquoted user-provided playbook path directly to a shell-executing function (run_kayobe) poses a command injection risk. It is recommended to resolve the path properly and wrap it with shlex.quote() to prevent shell injection.
|
What is the use case? I'm still wondering why you wouldn't just add a hook on control host bootstrap. |
My use case was that I had to run a playbook that added cert paths to venv outside of kayobe. |
Would that work with a regular hook? Or was there a particular issue where you needed to use ansible-playbook directly? |
Used in some environments already.