Unable to run ansible playbook inside docker container

Hi,

I need to run ansible playbook as part of my CI-CD pipeline.
The playbook is working fine from local machine. But when I run it via CI-CD pipline in gitlab, if fails with the following error

fatal: [10.0.12.133]: UNREACHABLE! => {
“changed”: false,
“msg”: “Authentication or permission failure. In some cases, you may have been able to authenticate and did not have permissions on the target directory. Consider changing the remote tmp path in ansible.cfg to a path rooted in "/tmp". Failed command was: ( umask 77 && mkdir -p "echo ~/.ansible/tmp/ansible-tmp-1529484705.7173536-247808703412310" && echo ansible-tmp-1529484705.7173536-247808703412310="echo ~/.ansible/tmp/ansible-tmp-1529484705.7173536-247808703412310" ), exited with result 6”,
“unreachable”: true
}

The image I use in the pipeline is built using the following Dockerfile

FROM python:3
RUN pip install ansible==2.5.4
RUN pip install cookiecutter==1.6.0
RUN apt-get update -y
RUN apt-get install sshpass -y