]> git.immae.eu Git - github/fretlink/docker-ansible.git/blobdiff - centos6-onbuild/Dockerfile
Add: support for Ubuntu 16.04 LTS (Xenial).
[github/fretlink/docker-ansible.git] / centos6-onbuild / Dockerfile
index 972b5dc11ef4e03e6f4fa9699f471690bcdc4351..a520a0f078ad1bcefcc31795e65f415e693fdf4a 100644 (file)
@@ -22,25 +22,32 @@ RUN echo "===> Installing EPEL..."        && \
     \
     \
     echo "===> Installing initscripts to emulate normal OS behavior..."  && \
-    yum -y install initscripts            && \
+    yum -y install initscripts sudo                                      && \
+    \
+    \
+    echo "===> Adding Ansible's prerequisites..."  && \
+    yum -y install gcc python-devel python-pip  \
+                       libffi-devel openssl-devel  && \
+    pip install --upgrade pip                      && \                 
     \
     \
     echo "===> Installing Ansible..."     && \
-    yum -y install ansible sudo           && \
+    pip install --upgrade ansible         && \
     \
     \
     echo "===> Disabling sudo 'requiretty' setting..."    && \
-    sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/'  /etc/sudoers   && \
+    sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/'  /etc/sudoers  || true  && \
     \
     \
-    echo "===> Removing unused YUM resources..."   && \
-    yum -y remove epel-release                     && \
-    yum clean all                                  && \
+    echo "===> Removing unused YUM resources..."             && \
+    yum -y remove epel-release gcc python-devel python-pip \
+                  libffi-devel openssl-devel  || true        && \
+    yum clean all                                            && \
     \
     \
     echo "===> Adding hosts for convenience..."    && \
     mkdir -p /etc/ansible                          && \
-    echo '[local]\nlocalhost\n' > /etc/ansible/hosts
+    echo 'localhost' > /etc/ansible/hosts
 
 
 COPY ansible-playbook-wrapper /usr/local/bin/