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

Enhancement: Pin python dependencies for development and testing #127

Closed
samrocketman opened this issue May 7, 2017 · 2 comments
Closed

Comments

@samrocketman
Copy link

samrocketman commented May 7, 2017

In order to test reliably, I recommend pinning your Python pip dependencies. virtualenv is recommended for this practice.

#create a .venv directory in the current directory
virtualenv --python $(type -P python2.7) .venv
#activate the virtual environment
source .venv/bin/activate
#all python pip changes only happen in the virtualenv .venv directory
#upgrade the version of pip
pip install -U pip
pip install ansible
pip freeze > requirements.txt

See also:

This method makes for more reliable and transparent testing/development.

@samrocketman
Copy link
Author

If the dev-sec team is open to this idea I'm willing to create a PR with suggested changes.

@rndmh3ro
Copy link
Member

rndmh3ro commented May 7, 2017

As of right now this is not needed for the ansible roles as they're tested with test-kitchen and Ansible is installed inside the vm/container.

However if we're to use molecule in the future, we should pin the dependencies. So I'm closing this in favor of #128, as it should be done there.

@rndmh3ro rndmh3ro closed this as completed May 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants