-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f5da4ad
Showing
7 changed files
with
1,108 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM ubuntu:14.04 | ||
MAINTAINER Oleg Borisenko [email protected] | ||
|
||
RUN apt-get update && apt-get install -y openssh-server && sed -i "s/Port 22/Port {{ ssh_port_to_expose }}/g" /etc/ssh/sshd_config && sed -i "s/UsePAM yes/UsePam no/g" /etc/ssh/sshd_config && echo "UseDNS no" >> /etc/ssh/sshd_config && service ssh restart | ||
RUN mkdir /root/.ssh && chmod 0700 /root/.ssh/ && echo "{{ lookup('file', '~/.ssh/id_rsa.pub') }}" >> /root/.ssh/authorized_keys | ||
EXPOSE {{ ssh_port_to_expose }} | ||
CMD ["/usr/sbin/sshd", "-D"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{% for host in groups['docker-containers'] %} | ||
{{ host }} | ||
{% endfor %} | ||
|
||
{{hostvars}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[all-hosts:children] | ||
docker | ||
ansible-master | ||
|
||
[all-hosts:vars] | ||
ssh_port_to_expose=2222 | ||
|
||
#n0x - real name of the host x; n0xhost - ansible alias for physical hosts | ||
[docker-host-nodes] | ||
#n01host ansible_ssh_port=22 ansible_ssh_host=n01 | ||
#n02host ansible_ssh_port=22 ansible_ssh_host=n02 | ||
#n03host ansible_ssh_port=22 ansible_ssh_host=n03 | ||
#n04host ansible_ssh_port=22 ansible_ssh_host=n04 | ||
#n05host ansible_ssh_port=22 ansible_ssh_host=n05 | ||
#n06host ansible_ssh_port=22 ansible_ssh_host=n06 | ||
lochost ansible_ssh_port=22 ansible_ssh_user=ars ansible_ssh_host=localhost | ||
|
||
[docker-containers] | ||
#locdock ansible_ssh_port="{{ ssh_port_to_expose }}" ansible_ssh_user=root host_key_checking=False ansible_ssh_host=localhost | ||
|
||
[docker:children] | ||
docker-host-nodes | ||
docker-containers | ||
|
||
[ansible-master] | ||
localhost ansible_ssh_port=22 |
Oops, something went wrong.