-
Notifications
You must be signed in to change notification settings - Fork 26
fix: simplify podman executable path lookup #142
Conversation
I don't know the playbook but I'm wondering why you're not changing things to use |
@apatard I'm not a maintainer and I'm just submitting fixes/improvements for issues that I'm running into while using the driver, but I've actually wondered about that myself, why this driver is using the shell/command modules instead of the podman modules. I opened a issue on the subject where we can discuss this further. ansible-community/molecule-plugins#78 |
I can answer this one. Podman collection was not really actively maintained and that gave more flexibility. Things change, I am not against using it, but be sure it is maintained. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use of lookup is not acceptable as it runs on control machine! Good that I remembered that before merging it.
Basically the real fix for this bug is a single line change that replaces |
But isn't this step of driver always running on the controller anyways? |
Happens to be on controlled does not mean it will always be that. Think about users using remote container machines. I would prefer to use command -v which is safe and portable. |
Ok I'm fine with I didn't realize that molecule could execute drivers that are located on a different host than molecule itself. But since that's the case I assume we should get rid of all the other lookups too? |
Depends. Not all lookups are risky. |
IMHO, the container client will still run on the controller, does't it? |
I didn't think that the first found lookup would be considered risky, I thought the issue with using a lookup would be because the lookup simply wouldn't work.
That was what I thought and then the lookups would behave exactly like any other task, since it's being ran against localhost anyways. |
Avoids unnecessary command tasks and removes
which
as a dependency that is not always present in minimal environments. (It's not available in https://github.com/ansible/creator-ee for example).