Skip to content

Commit 9b44fbc

Browse files
committed
Merge branch 'develop'
2 parents fd0a17f + 099cbc9 commit 9b44fbc

File tree

5 files changed

+57
-2
lines changed

5 files changed

+57
-2
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2016 Chu-Siang Lai
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Docker image: Ansible on Jupyter Notebook
22

3-
A Docker image for run [Ansible][ansible_offical] 2.2 on [Jupyter Notebook][jupyter_official] 4.2 (ipython notebook) with Browsers.
3+
A Docker image for run [Ansible][ansible_official] 2.2 on [Jupyter Notebook][jupyter_official] 4.2 (ipython notebook) with Browsers.
44

5-
[ansible_offical]: https://www.ansible.com/
5+
[ansible_official]: https://www.ansible.com/
66
[jupyter_official]: http://jupyter.org/
77

88
## Supported tags and respective `Dockerfile` links
@@ -105,3 +105,7 @@ Now, you can play the Ansible on Jupyter.
105105
1. Remember use the `!` prefix to trigger system command.
106106
107107
Enjoy it !
108+
109+
## License
110+
111+
Copyright (c) chusiang from 2016 under the MIT license.

ansible.cfg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[defaults]
2+
3+
hostfile = inventory
4+
remote_user = docker
5+
private_key_file = ~/.ssh/id_rsa
6+
host_key_checking = False
7+
retry_files_save_path = ./ansible-retry

inventory

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#debian-8.local ansible_ssh_host=192.168.1.102 ansible_ssh_port=32788

setup_jupyter.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@
5050
pip_packages:
5151
- docker-py
5252
- docker-compose
53+
54+
ssh_private_key_url: "https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/files/ssh/id_rsa"
55+
ansible_cfg_url: "https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ansible.cfg"
56+
inventory_url: "https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/inventory"
5357

5458
tasks:
5559
# General Linux.
@@ -125,4 +129,22 @@
125129
- name: install the jupyter notebook
126130
pip: name=jupyter version=1.0.0 state=present
127131

132+
# Create `ssh_config` directory.
133+
- name: create `/root/.ssh` directory
134+
file: path=/root/.ssh state=directory mode=0700
135+
136+
# Get the ssh private key.
137+
- name: get the ssh private key
138+
get_url: >
139+
url={{ ssh_private_key_url }} dest=/root/.ssh/id_rsa mode=0600
140+
checksum=md5:6cc26e77bf23a9d72a51b22387bea61f
141+
142+
# Get the ansible.cfg.
143+
- name: get the ansible.cfg file
144+
get_url: url={{ ansible_cfg_url }} dest=/home/ mode=0644
145+
146+
# Get the inventory file.
147+
- name: get the inventory file
148+
get_url: url={{ inventory_url }} dest=/home/ mode=0644
149+
128150
# vim:ft=ansible :

0 commit comments

Comments
 (0)