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

Create a /usr/bin/python3 symlink to the installed python #58

Merged
merged 5 commits into from
Nov 18, 2020

Conversation

jsf9k
Copy link
Member

@jsf9k jsf9k commented Nov 11, 2020

🗣 Description

Resolves #56.

💭 Motivation and Context

When Ansible runs it will look for /usr/bin/python3 and use it if it finds it; therefore, when Packer runs we need /usr/bin/python3 to point to the python executable that we installed via the setup-python action.

This change will hose other tasks that expect to find the system python at /usr/bin/python3, though, so we undo the change after running Packer.

🧪 Testing

I made the same changes in cisagov/kali-packer@b3a5c6f and verified there that they resulted in the correct python3 executable being used.

✅ Checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All new and existing tests pass.

When Ansible runs it will look for /usr/bin/python3 and use it if it
finds it.  Therefore we need /usr/bin/python3 to point to the desired
python when packer runs.

This change will hose other tasks that expect to find the system
python at /usr/bin/python3, though, so we undo the change after
running packer.

Resolves #56.
@jsf9k jsf9k added the bug This issue or pull request addresses broken functionality label Nov 11, 2020
@jsf9k jsf9k self-assigned this Nov 11, 2020
@jsf9k jsf9k marked this pull request as ready for review November 11, 2020 03:58
@jsf9k jsf9k requested review from dav3r and felddy as code owners November 11, 2020 03:58
@jsf9k jsf9k requested review from mcdonnnj and hillaryj November 11, 2020 03:58
Copy link
Member

@dav3r dav3r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great fix here, but please consider my request to enhance the comment slightly. 🔗

.github/workflows/prerelease.yml Outdated Show resolved Hide resolved
Also polish up the language a bit.

Co-authored-by: Dave Redmin <[email protected]>
@jsf9k jsf9k requested a review from dav3r November 12, 2020 17:06
Copy link
Member

@dav3r dav3r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellente! 🎉

Copy link
Member

@mcdonnnj mcdonnnj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for researching and fixing this issue. 🐧 I had a few comments for your consideration.

.github/workflows/prerelease.yml Outdated Show resolved Hide resolved
.github/workflows/release.yml Outdated Show resolved Hide resolved
@jsf9k jsf9k requested a review from mcdonnnj November 12, 2020 19:16
Copy link
Member

@mcdonnnj mcdonnnj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@hillaryj hillaryj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐍

@jsf9k jsf9k closed this in 02c5a6f Nov 18, 2020
@jsf9k jsf9k reopened this Nov 18, 2020
@jsf9k jsf9k merged commit 7b3f18d into develop Nov 18, 2020
@jsf9k jsf9k deleted the bugfix/force-ansible-to-use-correct-python3 branch November 18, 2020 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue or pull request addresses broken functionality
Projects
Development

Successfully merging this pull request may close these issues.

Use the correct Python executable when running Packer
4 participants