diff --git a/dockers/docker-sonic-mgmt/Dockerfile.j2 b/dockers/docker-sonic-mgmt/Dockerfile.j2 index a623a5b102..c30fa3d335 100644 --- a/dockers/docker-sonic-mgmt/Dockerfile.j2 +++ b/dockers/docker-sonic-mgmt/Dockerfile.j2 @@ -111,9 +111,7 @@ RUN apt-get update \ RUN pip install azure-kusto-data==0.0.13 \ azure-kusto-ingest==0.0.13 -# Install pytest-ansible module RUN pip install wheel==0.33.6 -RUN pip install pytest-ansible==2.2.2 ## Copy and install sonic-mgmt docker dependencies COPY \ @@ -131,6 +129,14 @@ RUN pip install ansible==2.8.12 RUN pip install pysubnettree +# Install pytest-ansible module with 'become', 'become_user' parameters support +RUN git clone https://github.com/ansible/pytest-ansible.git \ + && cd pytest-ansible \ + && git checkout d33c025f070a9c870220a157cc5a999fda68de44 \ + && python setup.py install \ + && cd .. \ + && rm -fr pytest-ansible + RUN mkdir /var/run/sshd EXPOSE 22