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

Support virtual environment for ansible 2.0.0.2 #4325

Merged
merged 3 commits into from
Mar 31, 2020
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions dockers/docker-sonic-mgmt/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ RUN pip install ipaddr \
paramiko==2.1.2 \
passlib \
ipython==5.4.1 \
virtualenv \
&& git clone https://github.com/p4lang/scapy-vxlan.git \
&& cd scapy-vxlan \
&& python setup.py install \
Expand Down Expand Up @@ -147,4 +148,8 @@ RUN azure-cli_bundle_*/installer
# TODO: if azure-cli contains newer version azure-keyvault, remove this
RUN ~/lib/azure-cli/bin/python -m pip install azure-keyvault==0.3.7 -U

# Install Virtual Environment
RUN python -m virtualenv --system-site-packages env-201803
RUN env-201803/bin/pip install ansible==2.0.0.2
Copy link
Collaborator

Choose a reason for hiding this comment

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

201811?

Copy link
Collaborator

Choose a reason for hiding this comment

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

also, do we have 2.0.0.2-1?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed to 201811. I only find 2.0.0.2, there are no 2.0.0.2-1.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Call the command ". env-201811/bin/activate" to initialize the environment. You will use ansible 2.0.0.2. The other python packages will use the same as system default ones. Only overwrite the ansible and its dependency packages.


RUN git clone https://github.com/Azure/sonic-mgmt