Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directory existance checks relying on ShellModule::checksum will fail when the python interpreter doesn't exist only #9704

Closed
jimktrains opened this issue Dec 3, 2014 · 2 comments
Labels
bug This issue/PR relates to a bug. P2 Priority 2 - Issue Blocks Release

Comments

@jimktrains
Copy link

Issue Type:

Bug Report

Ansible Version:

Last working release: 1.7.2
First affected release: 1.8.0
Working in devel branch: no
Commit introduced: d4d23b1

Environment:

Local System: Ubuntu 14.04
Remote System: FreeBSD 10

Summary:

When using a python interpreter that doesn't exist on the local machine (e.g. it's set to the location on the remote machine), ShellModule::checksum will return 4 (meaning the python interpreter doesn't exist), not 3 (meaning the file the checksum was asked for is a directory).

An example of a module that checks directory existence with ShellModule::checksum is unarchive with it's dest param.

Steps To Reproduce:

Set your python_interpreter to a path that doesn't exist on the local machine. Using a module such as unpack, attempt to do a directory existance check (e.g. unarchive src=/dev/zero dest=/tmp)

Expected Results:

The directory existence should be confirmed. (In the example above unzip should fail).

Actual Results:

The module fails with a "msg: dest 'dir' must be an existing dir" error.

@bcoca bcoca added P2 Priority 2 - Issue Blocks Release bug_report labels Dec 3, 2014
@abadger
Copy link
Contributor

abadger commented Dec 3, 2014

From irc discussion, this is happening as a part of a local_action:

@abadger abadger closed this as completed in a2b2e54 Dec 3, 2014
@abadger
Copy link
Contributor

abadger commented Dec 3, 2014

Thanks for working with me on IRC to identify and fix this!

Closing This Ticket

Hi!

We believe recent commits (likely detailed above) should resolve this question or problem for you.

This will also be included in the next major release.

If you continue seeing any problems related to this issue, or if you have any further questions, please let us know by stopping by one of the two mailing lists, as appropriate:

Because this project is very active, we're unlikely to see comments made on closed tickets, but the mailing list is a great way to ask questions, or post if you don't think this particular
issue is resolved.

Thank you!

@ansibot ansibot added bug This issue/PR relates to a bug. and removed bug_report labels Mar 6, 2018
@ansible ansible locked and limited conversation to collaborators Apr 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue/PR relates to a bug. P2 Priority 2 - Issue Blocks Release
Projects
None yet
Development

No branches or pull requests

4 participants