summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Cammarata <jimi@sngx.net>2016-03-20 16:41:10 -0400
committerJames Cammarata <jimi@sngx.net>2016-03-20 16:41:10 -0400
commit7460f76f8d8c7b231a14c5b6b492f57190a49d27 (patch)
treea1260ae56b66fe3e414612523183661769070b65
parent6824f3a7ccfd5be432b3a8dc68626815951d5b4c (diff)
parent4224c11b5fcc8e8e641b2b744a5020aa3a511e13 (diff)
downloadansible-7460f76f8d8c7b231a14c5b6b492f57190a49d27.tar.gz
Merge pull request #15052 from mattclay/travis-docker-ssh
Add ssh client and server to docker containers.
-rw-r--r--test/utils/docker/centos6/Dockerfile8
-rw-r--r--test/utils/docker/centos7/Dockerfile8
-rw-r--r--test/utils/docker/fedora-rawhide/Dockerfile7
-rw-r--r--test/utils/docker/fedora23/Dockerfile7
-rw-r--r--test/utils/docker/ubuntu1204/Dockerfile5
-rw-r--r--test/utils/docker/ubuntu1404/Dockerfile5
6 files changed, 40 insertions, 0 deletions
diff --git a/test/utils/docker/centos6/Dockerfile b/test/utils/docker/centos6/Dockerfile
index ebca54ae65..dd53b6e2ef 100644
--- a/test/utils/docker/centos6/Dockerfile
+++ b/test/utils/docker/centos6/Dockerfile
@@ -13,6 +13,8 @@ RUN yum -y install \
subversion \
sudo \
unzip \
+ openssh-clients \
+ openssh-server \
which
RUN yum -y install \
PyYAML \
@@ -33,5 +35,11 @@ RUN /bin/sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers
RUN mkdir /etc/ansible/
RUN /bin/echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts
#VOLUME /sys/fs/cgroup /run /tmp
+RUN ssh-keygen -q -t rsa1 -N '' -f /etc/ssh/ssh_host_key && \
+ ssh-keygen -q -t dsa -N '' -f /etc/ssh/ssh_host_dsa_key && \
+ ssh-keygen -q -t rsa -N '' -f /etc/ssh/ssh_host_rsa_key && \
+ ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \
+ cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \
+ for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done
ENV container=docker
CMD ["/sbin/init"]
diff --git a/test/utils/docker/centos7/Dockerfile b/test/utils/docker/centos7/Dockerfile
index 6e4f93dcaf..a23707ef58 100644
--- a/test/utils/docker/centos7/Dockerfile
+++ b/test/utils/docker/centos7/Dockerfile
@@ -21,6 +21,8 @@ RUN yum -y install \
subversion \
sudo \
unzip \
+ openssh-clients \
+ openssh-server \
which
RUN yum -y install \
PyYAML \
@@ -38,5 +40,11 @@ RUN /usr/bin/sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers
RUN mkdir /etc/ansible/
RUN /usr/bin/echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts
VOLUME /sys/fs/cgroup /run /tmp
+RUN ssh-keygen -q -t rsa1 -N '' -f /etc/ssh/ssh_host_key && \
+ ssh-keygen -q -t dsa -N '' -f /etc/ssh/ssh_host_dsa_key && \
+ ssh-keygen -q -t rsa -N '' -f /etc/ssh/ssh_host_rsa_key && \
+ ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \
+ cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \
+ for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done
ENV container=docker
CMD ["/usr/sbin/init"]
diff --git a/test/utils/docker/fedora-rawhide/Dockerfile b/test/utils/docker/fedora-rawhide/Dockerfile
index e587177607..7587b93ab4 100644
--- a/test/utils/docker/fedora-rawhide/Dockerfile
+++ b/test/utils/docker/fedora-rawhide/Dockerfile
@@ -37,11 +37,18 @@ RUN dnf -y install \
tar \
unzip \
which \
+ openssh-clients \
+ openssh-server \
yum
RUN localedef --quiet -c -i en_US -f UTF-8 en_US.UTF-8
RUN /usr/bin/sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers
RUN mkdir /etc/ansible/
RUN /usr/bin/echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts
VOLUME /sys/fs/cgroup /run /tmp
+RUN ssh-keygen -q -t dsa -N '' -f /etc/ssh/ssh_host_dsa_key && \
+ ssh-keygen -q -t rsa -N '' -f /etc/ssh/ssh_host_rsa_key && \
+ ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \
+ cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \
+ for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done
ENV container=docker
CMD ["/usr/sbin/init"]
diff --git a/test/utils/docker/fedora23/Dockerfile b/test/utils/docker/fedora23/Dockerfile
index d382794359..a056374387 100644
--- a/test/utils/docker/fedora23/Dockerfile
+++ b/test/utils/docker/fedora23/Dockerfile
@@ -37,6 +37,8 @@ RUN dnf -y install \
tar \
unzip \
which \
+ openssh-clients \
+ openssh-server \
yum
RUN localedef --quiet -f ISO-8859-1 -i pt_BR pt_BR
RUN localedef --quiet -f ISO-8859-1 -i es_MX es_MX
@@ -44,5 +46,10 @@ RUN /usr/bin/sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers
RUN mkdir /etc/ansible/
RUN /usr/bin/echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts
VOLUME /sys/fs/cgroup /run /tmp
+RUN ssh-keygen -q -t dsa -N '' -f /etc/ssh/ssh_host_dsa_key && \
+ ssh-keygen -q -t rsa -N '' -f /etc/ssh/ssh_host_rsa_key && \
+ ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \
+ cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \
+ for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done
ENV container=docker
CMD ["/usr/sbin/init"]
diff --git a/test/utils/docker/ubuntu1204/Dockerfile b/test/utils/docker/ubuntu1204/Dockerfile
index 347f911613..6924bba703 100644
--- a/test/utils/docker/ubuntu1204/Dockerfile
+++ b/test/utils/docker/ubuntu1204/Dockerfile
@@ -11,6 +11,8 @@ RUN apt-get install -y \
rubygems \
subversion \
sudo \
+ openssh-client \
+ openssh-server \
unzip
# helpful things taken from the ubuntu-upstart Dockerfile:
@@ -60,5 +62,8 @@ RUN /bin/sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers
RUN mkdir /etc/ansible/
RUN /bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts
RUN locale-gen en_US.UTF-8
+RUN ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \
+ cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \
+ for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done
ENV container docker
CMD ["/sbin/init"]
diff --git a/test/utils/docker/ubuntu1404/Dockerfile b/test/utils/docker/ubuntu1404/Dockerfile
index 25493c1f86..51d24c5e03 100644
--- a/test/utils/docker/ubuntu1404/Dockerfile
+++ b/test/utils/docker/ubuntu1404/Dockerfile
@@ -10,6 +10,8 @@ RUN apt-get install -y \
ruby \
subversion \
sudo \
+ openssh-client \
+ openssh-server \
unzip
# helpful things taken from the ubuntu-upstart Dockerfile:
@@ -57,5 +59,8 @@ RUN /bin/sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers
RUN mkdir /etc/ansible/
RUN /bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts
RUN locale-gen en_US.UTF-8
+RUN ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \
+ cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \
+ for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done
ENV container docker
CMD ["/sbin/init"]