├── ansible.cfg ├── .gitignore ├── files ├── ssh │ ├── id_rsa.pub │ └── id_rsa └── jupyter_notebook_config.py ├── bin └── retag_latest.sh ├── gentoo ├── docker-entrypoint.sh └── Dockerfile ├── alpine-3.4 ├── docker-entrypoint.sh └── Dockerfile ├── alpine-3.6 ├── docker-entrypoint.sh └── Dockerfile ├── alpine-3.7 ├── docker-entrypoint.sh └── Dockerfile ├── alpine-3 ├── docker-entrypoint.sh └── Dockerfile ├── archlinux ├── docker-entrypoint.sh └── Dockerfile ├── centos-7 ├── docker-entrypoint.sh └── Dockerfile ├── debian-7 ├── docker-entrypoint.sh └── Dockerfile ├── debian-8 ├── docker-entrypoint.sh └── Dockerfile ├── debian-9 ├── docker-entrypoint.sh └── Dockerfile ├── centos-6 ├── docker-entrypoint.sh └── Dockerfile ├── opensuse-42.1 ├── docker-entrypoint.sh └── Dockerfile ├── opensuse-42.2 ├── docker-entrypoint.sh └── Dockerfile ├── opensuse-42.3 ├── docker-entrypoint.sh └── Dockerfile ├── ubuntu-14.04 ├── docker-entrypoint.sh └── Dockerfile ├── ubuntu-16.04 ├── docker-entrypoint.sh └── Dockerfile ├── ubuntu-18.04 ├── docker-entrypoint.sh └── Dockerfile ├── alpine-3.4_ansible-2.1 ├── docker-entrypoint.sh └── Dockerfile ├── alpine-3.6_ansible-2.3 ├── docker-entrypoint.sh └── Dockerfile ├── alpine-3.6_ansible-2.4 ├── docker-entrypoint.sh └── Dockerfile ├── alpine-3.7_ansible-2.5 ├── docker-entrypoint.sh └── Dockerfile ├── alpine-3.8_ansible-2.6 ├── docker-entrypoint.sh └── Dockerfile ├── .yamllint.yaml ├── docker-compose.yml ├── .editorconfig ├── LICENSE ├── Makefile ├── inventory ├── README.md ├── setup_jupyter.yml └── ipynb └── ansible_on_jupyter_archlinux.ipynb /ansible.cfg: -------------------------------------------------------------------------------- 1 | [defaults] 2 | 3 | inventory = inventory 4 | remote_user = docker 5 | private_key_file = ~/.ssh/id_rsa 6 | host_key_checking = False 7 | retry_files_save_path = ./ansible-retry 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # - Ansible ------------------------------------------------------------------- 2 | 3 | ansible-retry/ 4 | 5 | 6 | # - macOS --------------------------------------------------------------------- 7 | 8 | .DS_Store 9 | 10 | 11 | 12 | # - Other --------------------------------------------------------------------- 13 | 14 | */Anaconda2-4.2.0-Linux-x86_64.sh 15 | Anaconda2-4.2.0-Linux-x86_64.sh 16 | -------------------------------------------------------------------------------- /files/ssh/id_rsa.pub: -------------------------------------------------------------------------------- 1 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCiTFk8yqYPf1ntjYtlm/+3KsR9ObD8DYW/SlMVQCwpDjVXoqnKdsNs6cqq8oxYlERio9eE7TZ+XobC6b6VZot3SQilv3QMUUaOw+KjuNa+mqhESAqSm6ErGLRMhqKNVdEw0zu+9ZSBDyPiyi9tzOovvc/9EKAOD1H8Lqbxj8AJMjgz5Ku+w3j2tQJ4AR0k8SF1EIflRLKsVmfb8BSnFAo12ut/XQKuzaXTGUKXsx+lSUMKKq9VRQp3peYJMAufNIxG4mOJQY2sknVDddOcFHOg9Ipvw9CZH45A36jRLInil3SXLS5hPYcJgBDQDT7NjIGCNn6VsbkLbZaekGQua95/ ansible-jupyter@drx.tw 2 | -------------------------------------------------------------------------------- /bin/retag_latest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DOCKER_IMAGE="chusiang/ansible-jupyter" 4 | DOCKER_TAG="alpine-3.6" 5 | 6 | echo '===> Pull current image ...' 7 | docker pull $DOCKER_IMAGE:$DOCKER_TAG 8 | echo 9 | 10 | echo '===> Tag current image to latest ...' 11 | docker tag $DOCKER_IMAGE:$DOCKER_TAG $DOCKER_IMAGE:latest 12 | echo 13 | 14 | echo '===> Push the latest tag ...' 15 | docker push $DOCKER_IMAGE:latest 16 | echo 17 | 18 | echo '===> Remove old image ...' 19 | docker rmi $(docker images | grep $DOCKER_IMAGE | grep '' | awk '{ print $3 }') 20 | -------------------------------------------------------------------------------- /gentoo/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ============================================================ 3 | # Author: Chu-Siang Lai / chusiang (at) drx.tw 4 | # Blog: http://note.drx.tw 5 | # Filename: docker-entrypoint.sh 6 | # Modified: 2016-11-20 18:43 7 | # Description: Run the jupyter service. 8 | # 9 | # --ip 0.0.0.0: Allow all IP access. 10 | # --no-browser: Don't open browser from command line. 11 | # --notebook-dir: Bunding the workdir. 12 | # 13 | # =========================================================== 14 | 15 | jupyter-notebook --ip 0.0.0.0 --no-browser --allow-root --notebook-dir=/home 16 | -------------------------------------------------------------------------------- /alpine-3.4/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ============================================================ 3 | # Author: Chu-Siang Lai / chusiang (at) drx.tw 4 | # Blog: http://note.drx.tw 5 | # Filename: docker-entrypoint.sh 6 | # Modified: 2016-11-20 18:43 7 | # Description: Run the jupyter service. 8 | # 9 | # --ip 0.0.0.0: Allow all IP access. 10 | # --no-browser: Don't open browser from command line. 11 | # --notebook-dir: Bunding the workdir. 12 | # 13 | # =========================================================== 14 | 15 | jupyter-notebook --ip 0.0.0.0 --no-browser --allow-root --notebook-dir=/home 16 | -------------------------------------------------------------------------------- /alpine-3.6/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ============================================================ 3 | # Author: Chu-Siang Lai / chusiang (at) drx.tw 4 | # Blog: http://note.drx.tw 5 | # Filename: docker-entrypoint.sh 6 | # Modified: 2016-11-20 18:43 7 | # Description: Run the jupyter service. 8 | # 9 | # --ip 0.0.0.0: Allow all IP access. 10 | # --no-browser: Don't open browser from command line. 11 | # --notebook-dir: Bunding the workdir. 12 | # 13 | # =========================================================== 14 | 15 | jupyter-notebook --ip 0.0.0.0 --no-browser --allow-root --notebook-dir=/home 16 | -------------------------------------------------------------------------------- /alpine-3.7/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ============================================================ 3 | # Author: Chu-Siang Lai / chusiang (at) drx.tw 4 | # Blog: http://note.drx.tw 5 | # Filename: docker-entrypoint.sh 6 | # Modified: 2016-11-20 18:43 7 | # Description: Run the jupyter service. 8 | # 9 | # --ip 0.0.0.0: Allow all IP access. 10 | # --no-browser: Don't open browser from command line. 11 | # --notebook-dir: Bunding the workdir. 12 | # 13 | # =========================================================== 14 | 15 | jupyter-notebook --ip 0.0.0.0 --no-browser --allow-root --notebook-dir=/home 16 | -------------------------------------------------------------------------------- /alpine-3/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ============================================================ 3 | # Author: Chu-Siang Lai / chusiang (at) drx.tw 4 | # Blog: http://note.drx.tw 5 | # Filename: docker-entrypoint.sh 6 | # Modified: 2016-11-20 18:43 7 | # Description: Run the jupyter service. 8 | # 9 | # --ip 0.0.0.0: Allow all IP access. 10 | # --no-browser: Don't open browser from command line. 11 | # --notebook-dir: Bunding the workdir. 12 | # 13 | # =========================================================== 14 | 15 | jupyter-notebook --ip 0.0.0.0 --no-browser --allow-root --notebook-dir=/home 16 | -------------------------------------------------------------------------------- /archlinux/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ============================================================ 3 | # Author: Chu-Siang Lai / chusiang (at) drx.tw 4 | # Blog: http://note.drx.tw 5 | # Filename: docker-entrypoint.sh 6 | # Modified: 2016-11-20 18:43 7 | # Description: Run the jupyter service. 8 | # 9 | # --ip 0.0.0.0: Allow all IP access. 10 | # --no-browser: Don't open browser from command line. 11 | # --notebook-dir: Bunding the workdir. 12 | # 13 | # =========================================================== 14 | 15 | jupyter-notebook --ip 0.0.0.0 --no-browser --allow-root --notebook-dir=/home 16 | -------------------------------------------------------------------------------- /centos-7/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ============================================================ 3 | # Author: Chu-Siang Lai / chusiang (at) drx.tw 4 | # Blog: http://note.drx.tw 5 | # Filename: docker-entrypoint.sh 6 | # Modified: 2016-11-20 18:43 7 | # Description: Run the jupyter service. 8 | # 9 | # --ip 0.0.0.0: Allow all IP access. 10 | # --no-browser: Don't open browser from command line. 11 | # --notebook-dir: Bunding the workdir. 12 | # 13 | # =========================================================== 14 | 15 | jupyter-notebook --ip 0.0.0.0 --no-browser --allow-root --notebook-dir=/home 16 | -------------------------------------------------------------------------------- /debian-7/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ============================================================ 3 | # Author: Chu-Siang Lai / chusiang (at) drx.tw 4 | # Blog: http://note.drx.tw 5 | # Filename: docker-entrypoint.sh 6 | # Modified: 2016-11-20 18:43 7 | # Description: Run the jupyter service. 8 | # 9 | # --ip 0.0.0.0: Allow all IP access. 10 | # --no-browser: Don't open browser from command line. 11 | # --notebook-dir: Bunding the workdir. 12 | # 13 | # =========================================================== 14 | 15 | jupyter-notebook --ip 0.0.0.0 --no-browser --allow-root --notebook-dir=/home 16 | -------------------------------------------------------------------------------- /debian-8/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ============================================================ 3 | # Author: Chu-Siang Lai / chusiang (at) drx.tw 4 | # Blog: http://note.drx.tw 5 | # Filename: docker-entrypoint.sh 6 | # Modified: 2016-11-20 18:43 7 | # Description: Run the jupyter service. 8 | # 9 | # --ip 0.0.0.0: Allow all IP access. 10 | # --no-browser: Don't open browser from command line. 11 | # --notebook-dir: Bunding the workdir. 12 | # 13 | # =========================================================== 14 | 15 | jupyter-notebook --ip 0.0.0.0 --no-browser --allow-root --notebook-dir=/home 16 | -------------------------------------------------------------------------------- /debian-9/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ============================================================ 3 | # Author: Chu-Siang Lai / chusiang (at) drx.tw 4 | # Blog: http://note.drx.tw 5 | # Filename: docker-entrypoint.sh 6 | # Modified: 2016-11-20 18:43 7 | # Description: Run the jupyter service. 8 | # 9 | # --ip 0.0.0.0: Allow all IP access. 10 | # --no-browser: Don't open browser from command line. 11 | # --notebook-dir: Bunding the workdir. 12 | # 13 | # =========================================================== 14 | 15 | jupyter-notebook --ip 0.0.0.0 --no-browser --allow-root --notebook-dir=/home 16 | -------------------------------------------------------------------------------- /centos-6/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ============================================================ 3 | # Author: Chu-Siang Lai / chusiang (at) drx.tw 4 | # Blog: http://note.drx.tw 5 | # Filename: docker-entrypoint.sh 6 | # Modified: 2016-11-20 18:43 7 | # Description: Run the jupyter service. 8 | # 9 | # --ip 0.0.0.0: Allow all IP access. 10 | # --no-browser: Don't open browser from command line. 11 | # --notebook-dir: Bunding the workdir. 12 | # 13 | # =========================================================== 14 | 15 | /opt/anaconda2/bin/jupyter-notebook --ip 0.0.0.0 --no-browser --notebook-dir=/home 16 | -------------------------------------------------------------------------------- /opensuse-42.1/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ============================================================ 3 | # Author: Chu-Siang Lai / chusiang (at) drx.tw 4 | # Blog: http://note.drx.tw 5 | # Filename: docker-entrypoint.sh 6 | # Modified: 2016-11-20 18:43 7 | # Description: Run the jupyter service. 8 | # 9 | # --ip 0.0.0.0: Allow all IP access. 10 | # --no-browser: Don't open browser from command line. 11 | # --notebook-dir: Bunding the workdir. 12 | # 13 | # =========================================================== 14 | 15 | jupyter-notebook --ip 0.0.0.0 --no-browser --allow-root --notebook-dir=/home 16 | -------------------------------------------------------------------------------- /opensuse-42.2/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ============================================================ 3 | # Author: Chu-Siang Lai / chusiang (at) drx.tw 4 | # Blog: http://note.drx.tw 5 | # Filename: docker-entrypoint.sh 6 | # Modified: 2016-11-20 18:43 7 | # Description: Run the jupyter service. 8 | # 9 | # --ip 0.0.0.0: Allow all IP access. 10 | # --no-browser: Don't open browser from command line. 11 | # --notebook-dir: Bunding the workdir. 12 | # 13 | # =========================================================== 14 | 15 | jupyter-notebook --ip 0.0.0.0 --no-browser --allow-root --notebook-dir=/home 16 | -------------------------------------------------------------------------------- /opensuse-42.3/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ============================================================ 3 | # Author: Chu-Siang Lai / chusiang (at) drx.tw 4 | # Blog: http://note.drx.tw 5 | # Filename: docker-entrypoint.sh 6 | # Modified: 2016-11-20 18:43 7 | # Description: Run the jupyter service. 8 | # 9 | # --ip 0.0.0.0: Allow all IP access. 10 | # --no-browser: Don't open browser from command line. 11 | # --notebook-dir: Bunding the workdir. 12 | # 13 | # =========================================================== 14 | 15 | jupyter-notebook --ip 0.0.0.0 --no-browser --allow-root --notebook-dir=/home 16 | -------------------------------------------------------------------------------- /ubuntu-14.04/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ============================================================ 3 | # Author: Chu-Siang Lai / chusiang (at) drx.tw 4 | # Blog: http://note.drx.tw 5 | # Filename: docker-entrypoint.sh 6 | # Modified: 2016-11-20 18:43 7 | # Description: Run the jupyter service. 8 | # 9 | # --ip 0.0.0.0: Allow all IP access. 10 | # --no-browser: Don't open browser from command line. 11 | # --notebook-dir: Bunding the workdir. 12 | # 13 | # =========================================================== 14 | 15 | jupyter-notebook --ip 0.0.0.0 --no-browser --allow-root --notebook-dir=/home 16 | -------------------------------------------------------------------------------- /ubuntu-16.04/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ============================================================ 3 | # Author: Chu-Siang Lai / chusiang (at) drx.tw 4 | # Blog: http://note.drx.tw 5 | # Filename: docker-entrypoint.sh 6 | # Modified: 2016-11-20 18:43 7 | # Description: Run the jupyter service. 8 | # 9 | # --ip 0.0.0.0: Allow all IP access. 10 | # --no-browser: Don't open browser from command line. 11 | # --notebook-dir: Bunding the workdir. 12 | # 13 | # =========================================================== 14 | 15 | jupyter-notebook --ip 0.0.0.0 --no-browser --allow-root --notebook-dir=/home 16 | -------------------------------------------------------------------------------- /ubuntu-18.04/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ============================================================ 3 | # Author: Chu-Siang Lai / chusiang (at) drx.tw 4 | # Blog: http://note.drx.tw 5 | # Filename: docker-entrypoint.sh 6 | # Modified: 2016-11-20 18:43 7 | # Description: Run the jupyter service. 8 | # 9 | # --ip 0.0.0.0: Allow all IP access. 10 | # --no-browser: Don't open browser from command line. 11 | # --notebook-dir: Bunding the workdir. 12 | # 13 | # =========================================================== 14 | 15 | jupyter-notebook --ip 0.0.0.0 --no-browser --allow-root --notebook-dir=/home 16 | -------------------------------------------------------------------------------- /alpine-3.4_ansible-2.1/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ============================================================ 3 | # Author: Chu-Siang Lai / chusiang (at) drx.tw 4 | # Blog: http://note.drx.tw 5 | # Filename: docker-entrypoint.sh 6 | # Modified: 2016-11-20 18:43 7 | # Description: Run the jupyter service. 8 | # 9 | # --ip 0.0.0.0: Allow all IP access. 10 | # --no-browser: Don't open browser from command line. 11 | # --notebook-dir: Bunding the workdir. 12 | # 13 | # =========================================================== 14 | 15 | jupyter-notebook --ip 0.0.0.0 --no-browser --allow-root --notebook-dir=/home 16 | -------------------------------------------------------------------------------- /alpine-3.6_ansible-2.3/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ============================================================ 3 | # Author: Chu-Siang Lai / chusiang (at) drx.tw 4 | # Blog: http://note.drx.tw 5 | # Filename: docker-entrypoint.sh 6 | # Modified: 2016-11-20 18:43 7 | # Description: Run the jupyter service. 8 | # 9 | # --ip 0.0.0.0: Allow all IP access. 10 | # --no-browser: Don't open browser from command line. 11 | # --notebook-dir: Bunding the workdir. 12 | # 13 | # =========================================================== 14 | 15 | jupyter-notebook --ip 0.0.0.0 --no-browser --allow-root --notebook-dir=/home 16 | -------------------------------------------------------------------------------- /alpine-3.6_ansible-2.4/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ============================================================ 3 | # Author: Chu-Siang Lai / chusiang (at) drx.tw 4 | # Blog: http://note.drx.tw 5 | # Filename: docker-entrypoint.sh 6 | # Modified: 2016-11-20 18:43 7 | # Description: Run the jupyter service. 8 | # 9 | # --ip 0.0.0.0: Allow all IP access. 10 | # --no-browser: Don't open browser from command line. 11 | # --notebook-dir: Bunding the workdir. 12 | # 13 | # =========================================================== 14 | 15 | jupyter-notebook --ip 0.0.0.0 --no-browser --allow-root --notebook-dir=/home 16 | -------------------------------------------------------------------------------- /alpine-3.7_ansible-2.5/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ============================================================ 3 | # Author: Chu-Siang Lai / chusiang (at) drx.tw 4 | # Blog: http://note.drx.tw 5 | # Filename: docker-entrypoint.sh 6 | # Modified: 2016-11-20 18:43 7 | # Description: Run the jupyter service. 8 | # 9 | # --ip 0.0.0.0: Allow all IP access. 10 | # --no-browser: Don't open browser from command line. 11 | # --notebook-dir: Bunding the workdir. 12 | # 13 | # =========================================================== 14 | 15 | jupyter-notebook --ip 0.0.0.0 --no-browser --allow-root --notebook-dir=/home 16 | -------------------------------------------------------------------------------- /alpine-3.8_ansible-2.6/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ============================================================ 3 | # Author: Chu-Siang Lai / chusiang (at) drx.tw 4 | # Blog: http://note.drx.tw 5 | # Filename: docker-entrypoint.sh 6 | # Modified: 2016-11-20 18:43 7 | # Description: Run the jupyter service. 8 | # 9 | # --ip 0.0.0.0: Allow all IP access. 10 | # --no-browser: Don't open browser from command line. 11 | # --notebook-dir: Bunding the workdir. 12 | # 13 | # =========================================================== 14 | 15 | jupyter-notebook --ip 0.0.0.0 --no-browser --allow-root --notebook-dir=/home 16 | -------------------------------------------------------------------------------- /.yamllint.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # Based on ansible-lint config 3 | extends: default 4 | 5 | rules: 6 | braces: {max-spaces-inside: 1, level: error} 7 | brackets: {max-spaces-inside: 1, level: error} 8 | colons: {max-spaces-after: -1, level: error} 9 | commas: {max-spaces-after: -1, level: error} 10 | comments: disable 11 | comments-indentation: disable 12 | document-start: disable 13 | empty-lines: {max: 3, level: error} 14 | hyphens: {level: error} 15 | indentation: disable 16 | key-duplicates: enable 17 | line-length: disable 18 | new-line-at-end-of-file: disable 19 | new-lines: {type: unix} 20 | trailing-spaces: disable 21 | truthy: disable -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | 4 | control-machine: 5 | image: chusiang/ansible-jupyter:alpine-3 6 | ports: 7 | - 8888:8888/tcp 8 | 9 | managed-node-ubuntu: 10 | image: chusiang/ansible-managed-node:ubuntu-16.04 11 | ports: 12 | - 2221:22/tcp 13 | 14 | managed-node-debian: 15 | image: chusiang/ansible-managed-node:debian-9 16 | ports: 17 | - 2222:22/tcp 18 | 19 | managed-node-centos: 20 | image: chusiang/ansible-managed-node:centos-7 21 | ports: 22 | - 2223:22/tcp 23 | 24 | managed-node-alpine: 25 | image: chusiang/ansible-managed-node:alpine-3.6 26 | ports: 27 | - 2224:22/tcp 28 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Unix-style newlines with a newline ending every file 7 | [*] 8 | end_of_line = lf 9 | insert_final_newline = true 10 | 11 | # Matches multiple files with brace expansion notation 12 | # Set default charset 13 | [*.{js,py}] 14 | charset = utf-8 15 | 16 | # 2 space indentation 17 | [*.{yml,sh},Vagrantfile,Dockerfile*] 18 | indent_size = 2 19 | indent_style = space 20 | 21 | # 4 space indentation 22 | [*.{py,md}] 23 | indent_size = 4 24 | indent_style = space 25 | 26 | # Tab indentation (no size specified) 27 | [Makefile] 28 | indent_style = tab 29 | tab_width = 8 30 | -------------------------------------------------------------------------------- /gentoo/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM gentoo/stage3-amd64 2 | 3 | MAINTAINER Chu-Siang Lai 4 | 5 | # Update the index of available packages. 6 | RUN emerge --sync 7 | 8 | # Install the requires portage package and python. 9 | RUN emerge python:2.7 dev-python/pip gentoolkit 10 | 11 | # switch python to v2.7. 12 | RUn eselect python set 1 13 | 14 | # Setup the ansible. 15 | RUN emerge ansible 16 | 17 | # for disable localhost warning message. 18 | RUN mkdir /etc/ansible && \ 19 | /bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts 20 | 21 | # Setup with Ansible. 22 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/setup_jupyter.yml /home 23 | RUN ansible-playbook -vvvv /home/setup_jupyter.yml 24 | 25 | # Copy a ipython notebook example to image. 26 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter.ipynb /home/ 27 | 28 | # Run service of Jupyter. 29 | COPY docker-entrypoint.sh /usr/local/bin/ 30 | ENTRYPOINT [ "docker-entrypoint.sh" ] 31 | EXPOSE 8888 32 | 33 | CMD [ "jupyter", "--version" ] 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 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. 22 | -------------------------------------------------------------------------------- /alpine-3.7/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.7 2 | 3 | MAINTAINER Chu-Siang Lai 4 | 5 | # Update the index of available packages. 6 | RUN apk update 7 | 8 | # Install the requires apk package and python. 9 | RUN apk add --no-cache linux-headers gcc build-base python py-pip python-dev \ 10 | libffi-dev openssl-dev ca-certificates 11 | 12 | # Upgrade the pip to lastest. 13 | RUN pip install -U pip 14 | 15 | # Setup the ansible. 16 | RUN pip install ansible 17 | 18 | # for disable localhost warning message. 19 | RUN mkdir /etc/ansible && \ 20 | /bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts 21 | 22 | # Setup with Ansible. 23 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/setup_jupyter.yml /home 24 | RUN ansible-playbook -vv /home/setup_jupyter.yml 25 | 26 | # Copy a ipython notebook example to image. 27 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter.ipynb /home/ 28 | 29 | # Run service of Jupyter. 30 | COPY docker-entrypoint.sh /usr/local/bin/ 31 | ENTRYPOINT [ "docker-entrypoint.sh" ] 32 | EXPOSE 8888 33 | 34 | CMD [ "jupyter", "--version" ] 35 | -------------------------------------------------------------------------------- /alpine-3.4/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.4 2 | 3 | MAINTAINER Chu-Siang Lai 4 | 5 | # Update the index of available packages. 6 | RUN apk update 7 | 8 | # Install the requires apk package and python. 9 | RUN apk add --no-cache linux-headers gcc build-base python py-pip python-dev \ 10 | libffi-dev openssl-dev ca-certificates 11 | 12 | # Upgrade the pip to lastest. 13 | RUN pip install -U pip 14 | 15 | # Setup the ansible. 16 | RUN pip install ansible 17 | 18 | # for disable localhost warning message. 19 | RUN mkdir /etc/ansible && \ 20 | /bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts 21 | 22 | # Setup with Ansible. 23 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/setup_jupyter.yml /home 24 | RUN ansible-playbook -vvvv /home/setup_jupyter.yml 25 | 26 | # Copy a ipython notebook example to image. 27 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter.ipynb /home/ 28 | 29 | # Run service of Jupyter. 30 | COPY docker-entrypoint.sh /usr/local/bin/ 31 | ENTRYPOINT [ "docker-entrypoint.sh" ] 32 | EXPOSE 8888 33 | 34 | CMD [ "jupyter", "--version" ] 35 | -------------------------------------------------------------------------------- /alpine-3.6/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.6 2 | 3 | MAINTAINER Chu-Siang Lai 4 | 5 | # Update the index of available packages. 6 | RUN apk update 7 | 8 | # Install the requires apk package and python. 9 | RUN apk add --no-cache linux-headers gcc build-base python py-pip python-dev \ 10 | libffi-dev openssl-dev ca-certificates 11 | 12 | # Upgrade the pip to lastest. 13 | RUN pip install -U pip 14 | 15 | # Setup the ansible. 16 | RUN pip install ansible 17 | 18 | # for disable localhost warning message. 19 | RUN mkdir /etc/ansible && \ 20 | /bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts 21 | 22 | # Setup with Ansible. 23 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/setup_jupyter.yml /home 24 | RUN ansible-playbook -vvvv /home/setup_jupyter.yml 25 | 26 | # Copy a ipython notebook example to image. 27 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter.ipynb /home/ 28 | 29 | # Run service of Jupyter. 30 | COPY docker-entrypoint.sh /usr/local/bin/ 31 | ENTRYPOINT [ "docker-entrypoint.sh" ] 32 | EXPOSE 8888 33 | 34 | CMD [ "jupyter", "--version" ] 35 | -------------------------------------------------------------------------------- /alpine-3/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3 2 | 3 | MAINTAINER Chu-Siang Lai 4 | 5 | # Update the index of available packages. 6 | RUN apk update 7 | 8 | # Install the requires apk package and python. 9 | RUN apk add --no-cache linux-headers gcc build-base python3 py-pip python3-dev \ 10 | libffi-dev openssl-dev ca-certificates py3-pyzmq 11 | 12 | # Upgrade the pip to lastest. 13 | RUN pip3 install -U pip 14 | 15 | # Setup the ansible. 16 | RUN pip3 install ansible 17 | 18 | # for disable localhost warning message. 19 | RUN mkdir /etc/ansible && \ 20 | /bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts 21 | 22 | # Setup with Ansible. 23 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/setup_jupyter.yml /home 24 | RUN ansible-playbook -vv /home/setup_jupyter.yml 25 | 26 | # Copy a ipython notebook example to image. 27 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter.ipynb /home/ 28 | 29 | # Run service of Jupyter. 30 | COPY docker-entrypoint.sh /usr/local/bin/ 31 | ENTRYPOINT [ "docker-entrypoint.sh" ] 32 | EXPOSE 8888 33 | 34 | CMD [ "jupyter", "--version" ] 35 | -------------------------------------------------------------------------------- /alpine-3.4_ansible-2.1/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.4 2 | 3 | MAINTAINER Chu-Siang Lai 4 | 5 | # Update the index of available packages. 6 | RUN apk update 7 | 8 | # Install the requires apk package and python. 9 | RUN apk add --no-cache linux-headers gcc build-base python py-pip python-dev \ 10 | libffi-dev openssl-dev ca-certificates 11 | 12 | # Upgrade the pip to lastest. 13 | RUN pip install -U pip 14 | 15 | # Setup the ansible. 16 | RUN pip install 'ansible>=2.1.0,<2.2.0' 17 | 18 | # for disable localhost warning message. 19 | RUN mkdir /etc/ansible && \ 20 | /bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts 21 | 22 | # Setup with Ansible. 23 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/setup_jupyter.yml /home 24 | RUN ansible-playbook -vvvv /home/setup_jupyter.yml 25 | 26 | # Copy a ipython notebook example to image. 27 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter.ipynb /home/ 28 | 29 | # Run service of Jupyter. 30 | COPY docker-entrypoint.sh /usr/local/bin/ 31 | ENTRYPOINT [ "docker-entrypoint.sh" ] 32 | EXPOSE 8888 33 | 34 | CMD [ "jupyter", "--version" ] 35 | -------------------------------------------------------------------------------- /alpine-3.6_ansible-2.3/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.6 2 | 3 | MAINTAINER Chu-Siang Lai 4 | 5 | # Update the index of available packages. 6 | RUN apk update 7 | 8 | # Install the requires apk package and python. 9 | RUN apk add --no-cache linux-headers gcc build-base python py-pip python-dev \ 10 | libffi-dev openssl-dev ca-certificates 11 | 12 | # Upgrade the pip to lastest. 13 | RUN pip install -U pip 14 | 15 | # Setup the ansible. 16 | RUN pip install 'ansible>=2.3.0,<2.4.0' 17 | 18 | # for disable localhost warning message. 19 | RUN mkdir /etc/ansible && \ 20 | /bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts 21 | 22 | # Setup with Ansible. 23 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/setup_jupyter.yml /home 24 | RUN ansible-playbook -vvvv /home/setup_jupyter.yml 25 | 26 | # Copy a ipython notebook example to image. 27 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter.ipynb /home/ 28 | 29 | # Run service of Jupyter. 30 | COPY docker-entrypoint.sh /usr/local/bin/ 31 | ENTRYPOINT [ "docker-entrypoint.sh" ] 32 | EXPOSE 8888 33 | 34 | CMD [ "jupyter", "--version" ] 35 | -------------------------------------------------------------------------------- /alpine-3.6_ansible-2.4/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.6 2 | 3 | MAINTAINER Chu-Siang Lai 4 | 5 | # Update the index of available packages. 6 | RUN apk update 7 | 8 | # Install the requires apk package and python. 9 | RUN apk add --no-cache linux-headers gcc build-base python py-pip python-dev \ 10 | libffi-dev openssl-dev ca-certificates 11 | 12 | # Upgrade the pip to lastest. 13 | RUN pip install -U pip 14 | 15 | # Setup the ansible. 16 | RUN pip install 'ansible>=2.4.0,<2.5.0' 17 | 18 | # for disable localhost warning message. 19 | RUN mkdir /etc/ansible && \ 20 | /bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts 21 | 22 | # Setup with Ansible. 23 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/setup_jupyter.yml /home 24 | RUN ansible-playbook -vvvv /home/setup_jupyter.yml 25 | 26 | # Copy a ipython notebook example to image. 27 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter.ipynb /home/ 28 | 29 | # Run service of Jupyter. 30 | COPY docker-entrypoint.sh /usr/local/bin/ 31 | ENTRYPOINT [ "docker-entrypoint.sh" ] 32 | EXPOSE 8888 33 | 34 | CMD [ "jupyter", "--version" ] 35 | -------------------------------------------------------------------------------- /alpine-3.7_ansible-2.5/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.7 2 | 3 | MAINTAINER Chu-Siang Lai 4 | 5 | # Update the index of available packages. 6 | RUN apk update 7 | 8 | # Install the requires apk package and python. 9 | RUN apk add --no-cache linux-headers gcc build-base python py-pip python-dev \ 10 | libffi-dev openssl-dev ca-certificates 11 | 12 | # Upgrade the pip to lastest. 13 | RUN pip install -U pip 14 | 15 | # Setup the ansible. 16 | RUN pip install 'ansible>=2.5.0,<2.6.0' 17 | 18 | # for disable localhost warning message. 19 | RUN mkdir /etc/ansible && \ 20 | /bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts 21 | 22 | # Setup with Ansible. 23 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/setup_jupyter.yml /home 24 | RUN ansible-playbook -vvvv /home/setup_jupyter.yml 25 | 26 | # Copy a ipython notebook example to image. 27 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter.ipynb /home/ 28 | 29 | # Run service of Jupyter. 30 | COPY docker-entrypoint.sh /usr/local/bin/ 31 | ENTRYPOINT [ "docker-entrypoint.sh" ] 32 | EXPOSE 8888 33 | 34 | CMD [ "jupyter", "--version" ] 35 | -------------------------------------------------------------------------------- /alpine-3.8_ansible-2.6/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.8 2 | 3 | MAINTAINER Chu-Siang Lai 4 | 5 | # Update the index of available packages. 6 | RUN apk update 7 | 8 | # Install the requires apk package and python. 9 | RUN apk add --no-cache linux-headers gcc build-base python py-pip python-dev \ 10 | libffi-dev openssl-dev ca-certificates 11 | 12 | # Upgrade the pip to lastest. 13 | RUN pip install -U pip 14 | 15 | # Setup the ansible. 16 | RUN pip install 'ansible>=2.6.0,<2.7.0' 17 | 18 | # for disable localhost warning message. 19 | RUN mkdir /etc/ansible && \ 20 | /bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts 21 | 22 | # Setup with Ansible. 23 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/setup_jupyter.yml /home 24 | RUN ansible-playbook -vvvv /home/setup_jupyter.yml 25 | 26 | # Copy a ipython notebook example to image. 27 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter.ipynb /home/ 28 | 29 | # Run service of Jupyter. 30 | COPY docker-entrypoint.sh /usr/local/bin/ 31 | ENTRYPOINT [ "docker-entrypoint.sh" ] 32 | EXPOSE 8888 33 | 34 | CMD [ "jupyter", "--version" ] 35 | -------------------------------------------------------------------------------- /centos-6/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM centos:6 2 | 3 | MAINTAINER Chu-Siang Lai 4 | 5 | # Upgrade and add third-party repository. 6 | RUN yum update -y && \ 7 | yum install -y epel-release 8 | 9 | # Install the requires yum package and python. 10 | RUN yum install -y \ 11 | python python-pip python-devel wget \ 12 | && \ 13 | yum clean all 14 | 15 | # Setup the ansible. 16 | RUN yum install -y ansible 17 | 18 | # for disable localhost warning message. 19 | RUN /bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts 20 | 21 | # Upgrade the pip to lastest. 22 | RUN pip install -U pip 23 | 24 | # Setup Python 2.7+ and Jupyter with Anaconda2. 25 | ADD https://repo.continuum.io/archive/Anaconda2-4.2.0-Linux-x86_64.sh /home 26 | RUN bash /home/Anaconda2-4.2.0-Linux-x86_64.sh -b -f -p /opt/anaconda2 && \ 27 | rm -f /home/Anaconda2-4.2.0-Linux-x86_64.sh && \ 28 | echo "PATH=$PATH:/opt/anaconda2/bin/:/opt/anaconda2/sbin/" > ~/.bashrc 29 | 30 | # Copy a ipython notebook example to image. 31 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter.ipynb /home/ 32 | 33 | # Run service of Jupyter. 34 | COPY docker-entrypoint.sh /usr/local/bin/ 35 | ENTRYPOINT [ "docker-entrypoint.sh" ] 36 | EXPOSE 8888 37 | 38 | CMD [ "jupyter", "--version" ] 39 | 40 | -------------------------------------------------------------------------------- /archlinux/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM finalduty/archlinux:daily 2 | 3 | MAINTAINER Chu-Siang Lai 4 | 5 | # Upgrade the currently installed packages. 6 | RUN pacman -Syu --noconfirm 7 | 8 | # Install the requires package and python. 9 | RUN pacman -S --noconfirm linux-headers gcc python python-pip base-devel \ 10 | libffi openssl \ 11 | && \ 12 | pacman -Scc --noconfirm 13 | 14 | # Upgrade the pip to lastest. 15 | RUN pip install -U pip 16 | 17 | # Setup the ansible. 18 | RUN pacman -S --noconfirm ansible && \ 19 | pacman -Scc --noconfirm 20 | 21 | # for disable localhost warning message. 22 | RUN /bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts 23 | 24 | # Setup with Ansible. 25 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/setup_jupyter.yml /home 26 | RUN ansible-playbook -vvvv /home/setup_jupyter.yml 27 | 28 | # Copy a ipython notebook example to image. 29 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter.ipynb /home/ 30 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter_archlinux.ipynb /home/ 31 | 32 | # Run service of Jupyter. 33 | COPY docker-entrypoint.sh /usr/local/bin/ 34 | ENTRYPOINT [ "docker-entrypoint.sh" ] 35 | EXPOSE 8888 36 | 37 | CMD [ "jupyter", "--version" ] 38 | -------------------------------------------------------------------------------- /centos-7/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM centos:7 2 | 3 | MAINTAINER Chu-Siang Lai 4 | 5 | # Upgrade and add third-party repository. 6 | RUN yum update -y && \ 7 | yum install -y epel-release 8 | 9 | # Install the requires yum package and python. 10 | RUN yum install -y \ 11 | kernel-headers gcc python python-pip python-devel \ 12 | libffi-devel openssl-devel \ 13 | && \ 14 | yum clean all 15 | 16 | # Upgrade the pip to lastest. 17 | RUN pip install -U pip 18 | 19 | # Setup the ansible. 20 | RUN pip install ansible 21 | 22 | # for disable localhost warning message. 23 | RUN mkdir /etc/ansible && \ 24 | /bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts 25 | 26 | # Setup with Ansible. 27 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/setup_jupyter.yml /home 28 | RUN ansible-playbook -vvvv /home/setup_jupyter.yml 29 | 30 | # Copy a ipython notebook example to image. 31 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter.ipynb /home/ 32 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter_centos.ipynb /home/ 33 | 34 | # Run service of Jupyter. 35 | COPY docker-entrypoint.sh /usr/local/bin/ 36 | ENTRYPOINT [ "docker-entrypoint.sh" ] 37 | EXPOSE 8888 38 | 39 | CMD [ "jupyter", "--version" ] 40 | -------------------------------------------------------------------------------- /debian-8/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:8 2 | 3 | MAINTAINER Chu-Siang Lai 4 | 5 | # Update the index of available packages. 6 | RUN apt-get update 7 | 8 | # Install the requires apt package and python. 9 | RUN apt-get install -y --no-install-recommends \ 10 | linux-headers-amd64 gcc build-essential python python-pip python-dev \ 11 | libffi-dev libssl-dev \ 12 | && \ 13 | apt-get clean 14 | 15 | # Upgrade the pip to lastest. 16 | RUN pip install -U pip 17 | 18 | # Setup the ansible. 19 | RUN pip install ansible 20 | 21 | # for disable localhost warning message. 22 | RUN mkdir /etc/ansible && \ 23 | /bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts 24 | 25 | # Setup with Ansible. 26 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/setup_jupyter.yml /home 27 | RUN ansible-playbook -vvvv /home/setup_jupyter.yml 28 | 29 | # Copy a ipython notebook example to image. 30 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter.ipynb /home/ 31 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter_debian.ipynb /home/ 32 | 33 | # Run service of Jupyter. 34 | COPY docker-entrypoint.sh /usr/local/bin/ 35 | ENTRYPOINT [ "docker-entrypoint.sh" ] 36 | EXPOSE 8888 37 | 38 | CMD [ "jupyter", "--version" ] 39 | -------------------------------------------------------------------------------- /debian-9/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:9 2 | 3 | MAINTAINER Chu-Siang Lai 4 | 5 | # Update the index of available packages. 6 | RUN apt-get update 7 | 8 | # Install the requires apt package and python. 9 | RUN apt-get install -y --no-install-recommends \ 10 | linux-headers-amd64 gcc build-essential python python-pip python-dev \ 11 | libffi-dev libssl-dev \ 12 | && \ 13 | apt-get clean 14 | 15 | # Upgrade the pip to lastest. 16 | RUN pip install -U pip 17 | 18 | # Install the setuptools. 19 | RUN pip install setuptools 20 | 21 | # Install the Ansible. 22 | RUN pip install ansible 23 | 24 | # for disable localhost warning message. 25 | RUN mkdir /etc/ansible && \ 26 | /bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts 27 | 28 | # Setup with Ansible. 29 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/setup_jupyter.yml /home 30 | RUN ansible-playbook -vvvv /home/setup_jupyter.yml 31 | 32 | # Copy a ipython notebook example to image. 33 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter.ipynb /home/ 34 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter_debian.ipynb /home/ 35 | 36 | # Run service of Jupyter. 37 | COPY docker-entrypoint.sh /usr/local/bin/ 38 | ENTRYPOINT [ "docker-entrypoint.sh" ] 39 | EXPOSE 8888 40 | 41 | CMD [ "jupyter", "--version" ] 42 | -------------------------------------------------------------------------------- /debian-7/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:7 2 | 3 | MAINTAINER Chu-Siang Lai 4 | 5 | # Update the index of available packages. 6 | RUN apt-get update 7 | 8 | # Install the requires apt package and python. 9 | RUN apt-get install -y --no-install-recommends \ 10 | linux-headers-amd64 gcc build-essential python python-pip python-dev \ 11 | libffi-dev libssl-dev \ 12 | && \ 13 | apt-get clean 14 | 15 | # Upgrade the pip to lastest. 16 | RUN pip install -i https://pypi.python.org/simple/ -U pip && \ 17 | ln -fs /usr/local/bin/pip /usr/bin/pip 18 | 19 | # Setup the ansible. 20 | RUN pip install ansible 21 | 22 | # for disable localhost warning message. 23 | RUN mkdir /etc/ansible && \ 24 | /bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts 25 | 26 | # Setup with Ansible. 27 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/setup_jupyter.yml /home 28 | RUN ansible-playbook -vvvv /home/setup_jupyter.yml 29 | 30 | # Copy a ipython notebook example to image. 31 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter.ipynb /home/ 32 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter_debian.ipynb /home/ 33 | 34 | # Run service of Jupyter. 35 | COPY docker-entrypoint.sh /usr/local/bin/ 36 | ENTRYPOINT [ "docker-entrypoint.sh" ] 37 | EXPOSE 8888 38 | 39 | CMD [ "jupyter", "--version" ] 40 | -------------------------------------------------------------------------------- /opensuse-42.1/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM opensuse:42.1 2 | 3 | MAINTAINER Chu-Siang Lai 4 | 5 | # Add third-party repository. 6 | RUN zypper addrepo -Gf http://download.opensuse.org/repositories/systemsmanagement/openSUSE_Leap_42.1/ systemsmanagement 7 | 8 | # Upgrade. 9 | RUN zypper update -y 10 | 11 | # Install the requires package and python. 12 | RUN zypper -n install \ 13 | kernel-devel gcc python python-pip python-devel \ 14 | libffi-devel-gcc5 libopenssl-devel libzmq5 \ 15 | && \ 16 | zypper clean -a 17 | 18 | # Install the Ansible 2.0+ 19 | RUN zypper -n install ansible && \ 20 | zypper clean -a 21 | 22 | # for disable localhost warning message. 23 | RUN /bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts 24 | 25 | # Upgrade the pip to lastest. 26 | RUN pip install -U pip 27 | 28 | # Setup with Ansible. 29 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/setup_jupyter.yml /home 30 | RUN ansible-playbook -vvvv /home/setup_jupyter.yml 31 | 32 | # Copy a ipython notebook example to image. 33 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter.ipynb /home/ 34 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter_opensuse.ipynb /home/ 35 | 36 | # Run service of Jupyter. 37 | COPY docker-entrypoint.sh /usr/local/bin/ 38 | ENTRYPOINT [ "docker-entrypoint.sh" ] 39 | EXPOSE 8888 40 | 41 | CMD [ "jupyter", "--version" ] 42 | -------------------------------------------------------------------------------- /opensuse-42.2/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM opensuse:42.2 2 | 3 | MAINTAINER Chu-Siang Lai 4 | 5 | # Add third-party repository. 6 | RUN zypper addrepo -Gf http://download.opensuse.org/repositories/systemsmanagement/openSUSE_Leap_42.2/ systemsmanagement 7 | 8 | # Upgrade. 9 | RUN zypper update -y 10 | 11 | # Install the requires package and python. 12 | RUN zypper -n install \ 13 | kernel-devel gcc python python-pip python-devel \ 14 | libffi-devel-gcc5 libopenssl-devel libzmq5 \ 15 | && \ 16 | zypper clean -a 17 | 18 | # Install the Ansible 2.0+ 19 | RUN zypper -n install ansible && \ 20 | zypper clean -a 21 | 22 | # for disable localhost warning message. 23 | RUN /bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts 24 | 25 | # Upgrade the pip to lastest. 26 | RUN pip install -U pip 27 | 28 | # Setup with Ansible. 29 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/setup_jupyter.yml /home 30 | RUN ansible-playbook -vvvv /home/setup_jupyter.yml 31 | 32 | # Copy a ipython notebook example to image. 33 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter.ipynb /home/ 34 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter_opensuse.ipynb /home/ 35 | 36 | # Run service of Jupyter. 37 | COPY docker-entrypoint.sh /usr/local/bin/ 38 | ENTRYPOINT [ "docker-entrypoint.sh" ] 39 | EXPOSE 8888 40 | 41 | CMD [ "jupyter", "--version" ] 42 | -------------------------------------------------------------------------------- /opensuse-42.3/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM opensuse:42.3 2 | 3 | MAINTAINER Chu-Siang Lai 4 | 5 | # Add third-party repository. 6 | RUN zypper addrepo -Gf http://download.opensuse.org/repositories/systemsmanagement/openSUSE_Leap_42.3/ systemsmanagement 7 | 8 | # Upgrade. 9 | RUN zypper update -y 10 | 11 | # Install the requires package and python. 12 | RUN zypper -n install \ 13 | kernel-devel gcc python python-pip python-devel \ 14 | libffi-devel-gcc5 libopenssl-devel libzmq5 \ 15 | && \ 16 | zypper clean -a 17 | 18 | # Install the Ansible 2.0+ 19 | RUN zypper -n install ansible && \ 20 | zypper clean -a 21 | 22 | # for disable localhost warning message. 23 | RUN /bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts 24 | 25 | # Upgrade the pip to lastest. 26 | RUN pip install -U pip 27 | 28 | # Setup with Ansible. 29 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/setup_jupyter.yml /home 30 | RUN ansible-playbook -vvvv /home/setup_jupyter.yml 31 | 32 | # Copy a ipython notebook example to image. 33 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter.ipynb /home/ 34 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter_opensuse.ipynb /home/ 35 | 36 | # Run service of Jupyter. 37 | COPY docker-entrypoint.sh /usr/local/bin/ 38 | ENTRYPOINT [ "docker-entrypoint.sh" ] 39 | EXPOSE 8888 40 | 41 | CMD [ "jupyter", "--version" ] 42 | -------------------------------------------------------------------------------- /ubuntu-18.04/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:18.04 2 | 3 | MAINTAINER Chu-Siang Lai 4 | 5 | # Update the index of available packages. 6 | RUN apt-get update 7 | 8 | # Install the requires apt package and python. 9 | RUN apt-get install -y --no-install-recommends \ 10 | linux-headers-generic gcc build-essential python python-pip python-dev \ 11 | libffi-dev \ 12 | && \ 13 | apt-get clean 14 | 15 | # Setup the ansible. 16 | RUN apt-get install -y --no-install-recommends software-properties-common 17 | 18 | RUN add-apt-repository ppa:ansible/ansible -y && apt-get update 19 | 20 | RUN apt-get install -y --no-install-recommends \ 21 | ansible \ 22 | && \ 23 | apt-get clean 24 | 25 | # for disable localhost warning message. 26 | RUN /bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts 27 | 28 | # Upgrade the pip to lastest. 29 | RUN pip install -U pip 30 | 31 | # Setup with Ansible. 32 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/setup_jupyter.yml /home 33 | RUN ansible-playbook -v /home/setup_jupyter.yml 34 | 35 | # Copy a ipython notebook example to image. 36 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter.ipynb /home/ 37 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter_ubuntu.ipynb /home/ 38 | 39 | # Run service of Jupyter. 40 | COPY docker-entrypoint.sh /usr/local/bin/ 41 | ENTRYPOINT [ "docker-entrypoint.sh" ] 42 | EXPOSE 8888 43 | 44 | CMD [ "jupyter", "--version" ] 45 | -------------------------------------------------------------------------------- /ubuntu-14.04/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:14.04 2 | 3 | MAINTAINER Chu-Siang Lai 4 | 5 | # Update the index of available packages. 6 | RUN apt-get update 7 | 8 | # Install the requires apt package and python. 9 | RUN apt-get install -y --no-install-recommends \ 10 | linux-headers-generic gcc build-essential python python-pip python-dev \ 11 | libffi-dev \ 12 | && \ 13 | apt-get clean 14 | 15 | # Setup the ansible. 16 | RUN apt-get install -y --no-install-recommends \ 17 | python-software-properties software-properties-common 18 | 19 | RUN add-apt-repository ppa:ansible/ansible -y && apt-get update 20 | 21 | RUN apt-get install -y --no-install-recommends \ 22 | ansible \ 23 | && \ 24 | apt-get clean 25 | 26 | # for disable localhost warning message. 27 | RUN /bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts 28 | 29 | # Upgrade the pip to lastest. 30 | RUN pip install -U pip 31 | 32 | # Setup with Ansible. 33 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/setup_jupyter.yml /home 34 | RUN ansible-playbook -vvvv /home/setup_jupyter.yml 35 | 36 | # Copy a ipython notebook example to image. 37 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter.ipynb /home/ 38 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter_ubuntu.ipynb /home/ 39 | 40 | # Run service of Jupyter. 41 | COPY docker-entrypoint.sh /usr/local/bin/ 42 | ENTRYPOINT [ "docker-entrypoint.sh" ] 43 | EXPOSE 8888 44 | 45 | CMD [ "jupyter", "--version" ] 46 | -------------------------------------------------------------------------------- /ubuntu-16.04/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | 3 | MAINTAINER Chu-Siang Lai 4 | 5 | # Update the index of available packages. 6 | RUN apt-get update 7 | 8 | # Install the requires apt package and python. 9 | RUN apt-get install -y --no-install-recommends \ 10 | linux-headers-generic gcc build-essential python python-pip python-dev \ 11 | libffi-dev \ 12 | && \ 13 | apt-get clean 14 | 15 | # Setup the ansible. 16 | RUN apt-get install -y --no-install-recommends \ 17 | python-software-properties software-properties-common 18 | 19 | RUN add-apt-repository ppa:ansible/ansible -y && apt-get update 20 | 21 | RUN apt-get install -y --no-install-recommends \ 22 | ansible \ 23 | && \ 24 | apt-get clean 25 | 26 | # for disable localhost warning message. 27 | RUN /bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts 28 | 29 | # Upgrade the pip to lastest. 30 | RUN pip install -U pip 31 | 32 | # Setup with Ansible. 33 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/setup_jupyter.yml /home 34 | RUN ansible-playbook -vvvv /home/setup_jupyter.yml 35 | 36 | # Copy a ipython notebook example to image. 37 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter.ipynb /home/ 38 | ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter_ubuntu.ipynb /home/ 39 | 40 | # Run service of Jupyter. 41 | COPY docker-entrypoint.sh /usr/local/bin/ 42 | ENTRYPOINT [ "docker-entrypoint.sh" ] 43 | EXPOSE 8888 44 | 45 | CMD [ "jupyter", "--version" ] 46 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # ============================================================================= 2 | # Author: Chu-Siang Lai / chusiang (at) drx.tw 3 | # Blog: http://note.drx.tw 4 | # Filename: Makefile 5 | # Modified: 2019-08-01 00:13 6 | # Description: Do something with make. 7 | # ============================================================================= 8 | 9 | .PHONY: main check syntax_check lint_check yaml_check \ 10 | pull run start stop retag_latest \ 11 | clean 12 | 13 | main: check 14 | 15 | # - Check --------------------------------------------------------------------- 16 | 17 | check: syntax_check lint_check yaml_check 18 | 19 | syntax_check: 20 | ansible-playbook --syntax-check setup*.yml 21 | 22 | lint_check: 23 | ansible-lint setup*.yml 24 | 25 | yaml_check: 26 | find -name "*.yml" -type f -exec yamllint -c .yamllint.yaml {} \; 27 | 28 | # - Docker -------------------------------------------------------------------- 29 | 30 | # Only download the docker image. 31 | pull: 32 | docker pull chusiang/ansible-jupyter:alpine-3.4 33 | docker pull chusiang/ansible-managed-node:alpine-3.4 34 | docker pull chusiang/ansible-managed-node:centos-7 35 | docker pull chusiang/ansible-managed-node:debian-8 36 | docker pull chusiang/ansible-managed-node:ubuntu-14.04 37 | 38 | # Run containers. 39 | run: 40 | docker-compose up 41 | 42 | # Start containers. 43 | start: 44 | docker-compose start 45 | 46 | # Stop containers. 47 | stop: 48 | docker-compose stop 49 | 50 | # Retag and push the latest tag. 51 | retag_latest: 52 | -sh bin/retag_latest.sh 53 | 54 | # - Clean --------------------------------------------------------------------- 55 | 56 | clean: 57 | # Remove containers. 58 | docker-compose rm -f 59 | -------------------------------------------------------------------------------- /files/ssh/id_rsa: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIEowIBAAKCAQEAokxZPMqmD39Z7Y2LZZv/tyrEfTmw/A2Fv0pTFUAsKQ41V6Kp 3 | ynbDbOnKqvKMWJREYqPXhO02fl6Gwum+lWaLd0kIpb90DFFGjsPio7jWvpqoREgK 4 | kpuhKxi0TIaijVXRMNM7vvWUgQ8j4sovbczqL73P/RCgDg9R/C6m8Y/ACTI4M+Sr 5 | vsN49rUCeAEdJPEhdRCH5USyrFZn2/AUpxQKNdrrf10Crs2l0xlCl7MfpUlDCiqv 6 | VUUKd6XmCTALnzSMRuJjiUGNrJJ1Q3XTnBRzoPSKb8PQmR+OQN+o0SyJ4pd0ly0u 7 | YT2HCYAQ0A0+zYyBgjZ+lbG5C22WnpBkLmvefwIDAQABAoIBABmvg5//YnCpcw4J 8 | jLo0CjBu8FHxQ3Vgnn47wRJn6ZVFzmNkNwL38M3X4l9Tq6qJLJl/3KgI8srlIubO 9 | H399jyz9vgSdXDxm0IffsIrAwhvAVkkYLbQuNT+g1UgXNrqvjj/v7lC2hR43yzIl 10 | VYRHHfkYTUZ7zxjqi8shhwJMAdRygZxbzcaQD9l6My4jXWrfnRJ312Eq2j2KLz6w 11 | YaRCxEk89mqc9fBQYbDNIuJeiCXdl75j4pJV6K9WPq2CRcbLkY3UWlCRHbDfBd3j 12 | oezsp9q+5rKU56KOCa8TxYjZKr8J6Fk2Z1cf0hJn60Zg7G3L7C5Lv9T66C+VgFCP 13 | 4J+qvGECgYEA124heyntcYJrd7rhDJI9gbGwjUZIoMjUiVwWsCOKpr31eXcpF+77 14 | dzqzCSlopO4m0IPgYGIhdPlpTlzcZUb6qmRwrnG0rpSyZfoT3skSwFpHQV0C66es 15 | fJPKd2hZ89MGrwXbe9Ne4tAzkaTGduVg2V2SlRlKZTmQj5+WB6TB0h0CgYEAwNy7 16 | I+LJCUrFbbRf2oOSKCcqbFR9OEixPShJiepmhjhiPs2S+lEXJJg7Fpefa+V+UqLU 17 | 5dlb+0AQm+ysbF2GMKJr+kb0FaPzo413rlG1dqwZwEyeFms83KHKvMwTXH9oTwSQ 18 | krnsPIFSFS2K1V2MdaOBsyr8FKvpExaq9JbPkEsCgYBWgF8rQDOaT17tjXlN/e56 19 | hCm7IEyLWviUSwjFIxBKUZ4ebq1uccRBJK288QaWqxWkxj8zFFQQzxDsqTbJ581A 20 | 2+Gu+fMt4oEbl2WhICXKXLWd1kYU75e/0ewLNDhiQgq9/mEaAE5qTmVWhs418XaI 21 | 8Ryph6UqrgmQ0eiBGzPENQKBgQCYhbgGIFMm4xgRs2Ve1VCgKqE1PPguq+ZnXFYU 22 | GOjt2udvjXpgNgMccLvCGTT9ymfFiHrgL667m6XG+jw+ExSNn9XO/5AHETscLEPq 23 | +zmMWXygBLe9OR/PyLAh8S6apzPh0dVYBGtcSlWU5Ah4xtvPKPjoreTfoDjaXMHk 24 | XuRV0wKBgHI5vFvJKosTCx3FSlV2CMqiaa2YqZa7EG0fUyoGyhB/Ms/jHrmZ9oTt 25 | 21b9KGgOIsC4UC489B7+gWL+xwD9MUus8V8nmG3T48kejnRQNtYmyTjimYQfuX1R 26 | wRwFy92IBMU1zCjBwKkC5MhcOKDQgYTClZ4EsK7Lzr/bkzVoxfQy 27 | -----END RSA PRIVATE KEY----- 28 | -------------------------------------------------------------------------------- /inventory: -------------------------------------------------------------------------------- 1 | # ============================================================ 2 | # Author: Chu-Siang Lai / chusiang (at) drx.tw 3 | # Blog: http://note.drx.tw 4 | # Filename: inventory 5 | # Modified: 2017-11-10 00:13 6 | # Description: The managed nodes list for Ansible. 7 | # 8 | # Syntax: 9 | # 10 | # 11 | # debian-8 ansible_ssh_host=192.168.1.109 ansible_ssh_port=32788 12 | # 13 | # Common Option: 14 | # 15 | # `ansible_ssh_host`: Remote host IP. 16 | # `ansible_ssh_user`: Remote ssh username. 17 | # `ansible_ssh_private_key_file`: ssh private key path. 18 | # `ansible_ssh_port`: ssh port. 19 | # `ansible_ssh_pass`: ssh password. (Not recommended) 20 | # 21 | # Reference: http://docs.ansible.com/ansible/latest/intro_inventory.html 22 | # ============================================================ 23 | 24 | # Host & Group 25 | ############## 26 | 27 | [alpine] 28 | #alpine-3.4 ansible_ssh_host=192.168.1.109 ansible_ssh_port=32781 29 | #alpine-3.6 ansible_ssh_host=192.168.1.109 ansible_ssh_port=32782 30 | 31 | [archlinux] 32 | #archlinux ansible_ssh_host=192.168.1.109 ansible_ssh_port=32783 33 | 34 | [centos] 35 | #centos-7 ansible_ssh_host=192.168.1.109 ansible_ssh_port=32784 36 | 37 | [debian] 38 | #debian-7 ansible_ssh_host=192.168.1.109 ansible_ssh_port=32785 39 | #debian-8 ansible_ssh_host=192.168.1.109 ansible_ssh_port=32786 40 | #debian-9 ansible_ssh_host=192.168.1.109 ansible_ssh_port=32787 41 | 42 | [opensuse] 43 | #opensuse-42.2 ansible_ssh_host=192.168.1.109 ansible_ssh_port=32788 44 | #opensuse-42.3 ansible_ssh_host=192.168.1.109 ansible_ssh_port=32789 45 | 46 | [ubuntu] 47 | #ubuntu-14.04 ansible_ssh_host=192.168.1.109 ansible_ssh_port=32790 48 | #ubuntu-16.04 ansible_ssh_host=192.168.1.109 ansible_ssh_port=32791 49 | 50 | # Group of Group 51 | ################ 52 | 53 | [test:children] 54 | alpine 55 | archlinux 56 | centos 57 | debian 58 | opensuse 59 | ubuntu 60 | 61 | # vim: ft=ansible : 62 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Docker image: Ansible on Jupyter Notebook 2 | 3 | [![Docker Hub](https://img.shields.io/badge/docker-ansible--jupyter-blue.svg)](https://hub.docker.com/r/chusiang/ansible-jupyter/) [![microbadger](https://images.microbadger.com/badges/image/chusiang/ansible-jupyter.svg)](https://microbadger.com/images/chusiang/ansible-jupyter "Get your own image badge on microbadger.com") 4 | 5 | A Docker image for run [Ansible][ansible_official] 2.x on [Jupyter Notebook][jupyter_official] 4.x (ipython notebook) with Browsers. 6 | 7 | [ansible_official]: https://www.ansible.com/ 8 | [jupyter_official]: http://jupyter.org/ 9 | 10 | ## Supported tags and respective `Dockerfile` links 11 | 12 | - `alpine-3`, `latest` [*(alpine-3/Dockerfile)*][dockerfile_alpine-3] 13 | - `archlinux` [*(archlinux/Dockerfile)*][dockerfile_archlinux] 14 | - `centos-7` [*(centos-7/Dockerfile)*][dockerfile_centos-7] 15 | - `debian-9` [*(debian-9/Dockerfile)*][dockerfile_debian-9] 16 | - ~~`gentoo`~~ [*(gentoo/Dockerfile)*][dockerfile_gentoo] 17 | - `opensuse-42.3` [*(opensuse-42.3/Dockerfile)*][dockerfile_opensuse-42.3] 18 | - `ubuntu-18.04` [*(ubuntu-18.04/Dockerfile)*][dockerfile_ubuntu-18.04] 19 | 20 | [dockerfile_alpine-3]: https://github.com/chusiang/ansible-jupyter.dockerfile/blob/master/alpine-3/Dockerfile 21 | [dockerfile_archlinux]: https://github.com/chusiang/ansible-jupyter.dockerfile/blob/master/archlinux/Dockerfile 22 | [dockerfile_centos-7]: https://github.com/chusiang/ansible-jupyter.dockerfile/blob/master/centos-7/Dockerfile 23 | [dockerfile_debian-9]: https://github.com/chusiang/ansible-jupyter.dockerfile/blob/master/debian-9/Dockerfile 24 | [dockerfile_gentoo]: https://github.com/chusiang/ansible-jupyter.dockerfile/blob/master/gentoo/Dockerfile 25 | [dockerfile_opensuse-42.3]: https://github.com/chusiang/ansible-jupyter.dockerfile/blob/master/opensuse-42.3/Dockerfile 26 | [dockerfile_ubuntu-18.04]: https://github.com/chusiang/ansible-jupyter.dockerfile/blob/master/ubuntu-18.04/Dockerfile 27 | 28 | ## Build image 29 | 30 | 1. Get this project. 31 | 32 | ``` 33 | $ git clone https://github.com/chusiang/ansible-jupyter.dockerfile.git 34 | ``` 35 | 36 | 1. Go to workspace. 37 | 38 | ``` 39 | $ cd ansible-jupyter.dockerfile// 40 | ``` 41 | 42 | 1. Bunild the image. 43 | 44 | ``` 45 | $ docker build -t chusiang/ansible-jupyter . 46 | ``` 47 | 48 | ## Run container 49 | 50 | 1. Get image. 51 | 52 | ``` 53 | $ docker pull chusiang/ansible-jupyter 54 | ``` 55 | 56 | 1. Run the container with daemon mode. 57 | 58 | ``` 59 | $ docker run --name ansible-jupyter -P -d chusiang/ansible-jupyter 60 | be8a15b9d4da5d24610c1fc738cb13086f01101e90f94640360d8d84892de772 61 | ``` 62 | 63 | 1. Check container process. 64 | 65 | ``` 66 | $ docker ps 67 | CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 68 | be8a15b9d4da chusiang/ansible-jupyter "docker-entrypoint.sh" 12 seconds ago Up 11 seconds 0.0.0.0:32808->8888/tcp ansible-jupyter 69 | ``` 70 | 71 | 1. Enter container with command line. 72 | 73 | ``` 74 | $ docker exec -it ansible-jupyter sh 75 | / # 76 | ``` 77 | 78 | ## Play Ansible on Jupyter 79 | 80 | Now, you can play the Ansible on Jupyter. 81 | 82 | 1. Go jupyter web. 83 | 84 | ``` 85 | # GNU/Linux 86 | $ firefox http://localhost:32786 87 | 88 | # macOS 89 | $ open http://localhost:32786 90 | ``` 91 | 92 | ![2016-11-20-ansible-jupyter1] 93 | 94 | 1. Attach my example ==> [`ansible_on_jupyter.ipynb`][ansible_on_jupyter.ipynb]. 95 | 96 | ![2016-11-20-ansible-jupyter2] 97 | 98 | 1. Remember use the `!` prefix to trigger system command. 99 | 100 | You can see more detail at [怎麼用 Jupyter 操控 Ansible?(localhost) | 現代 IT 人一定要知道的 Ansible 自動化組態技巧](https://chusiang.gitbooks.io/automate-with-ansible/07.how-to-practive-the-ansible-with-jupyter1.html) . 101 | 102 | Enjoy it ! 103 | 104 | [ansible_on_jupyter.ipynb]: https://github.com/chusiang/ansible-jupyter.dockerfile/blob/master/ipynb/ansible_on_jupyter.ipynb 105 | [2016-11-20-ansible-jupyter1]: https://cloud.githubusercontent.com/assets/219066/20463322/218f0c4a-af6b-11e6-9a95-2411ec7acb5f.png 106 | [2016-11-20-ansible-jupyter2]: https://cloud.githubusercontent.com/assets/219066/20463319/fa8c047c-af6a-11e6-96d6-f985096c9c8c.png 107 | 108 | ## History 109 | 110 | ### 2020 111 | 112 | * 12/12 Fixed Python 3 dependency problem on Alpine Linux v3.12, and stop support some EOL images. 113 | 114 | ### 2018 115 | 116 | * 07/11 Add new images of `alpine-3.8`. Stop automated build image of `alpine-3.4`, `alpine-3.6` and `opensuse-42.2`. 117 | * 06/18 Add new images of `alpine-3.7`, `ubuntu-18.04`. Stop automated build image of `ubuntu-14.04`. 118 | * 01/10 Stop automated build images of `centos-6`, `debian-7` and `alpine-3.4_ansible-2.1`. 119 | 120 | ### 2017 121 | 122 | * ??/?? Stop automated build images of `gentoo`, `opensuse-42.1` and `alpine-3.4`. 123 | 124 | ## License 125 | 126 | Copyright (c) chusiang from 2016-2020 under the MIT license. 127 | -------------------------------------------------------------------------------- /setup_jupyter.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | - name: "Setup Ansible-Jupyter" 4 | hosts: localhost 5 | 6 | vars: 7 | 8 | # General package on GNU/Linux. 9 | general_packages: 10 | - bash 11 | - bash-completion 12 | - ca-certificates 13 | - curl 14 | - git 15 | - openssl 16 | - sshpass 17 | 18 | # Alpine Linux. 19 | apk_packages: 20 | - openssh-client 21 | - vim 22 | 23 | # Debian, Ubuntu. 24 | apt_packages: "{{ apk_packages }}" 25 | 26 | # Arch Linux. 27 | pacman_packages: 28 | - openssh 29 | - vim 30 | 31 | # Gentoo Linux. 32 | portage_packages: 33 | - bash 34 | - bash-completion 35 | - ca-certificates 36 | - dev-vcs/git 37 | - net-misc/curl 38 | - openssh 39 | - openssl 40 | - sqlite 41 | - vim 42 | 43 | # CentOS. 44 | yum_packages: 45 | - openssh-clients 46 | - vim-minimal 47 | 48 | # openSUSE. 49 | zypper_packages: "{{ pacman_packages }}" 50 | 51 | # Python. 52 | pip_packages: 53 | - docker-py 54 | - docker-compose 55 | 56 | jupyter_notebook_config_py_url: "https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/files/jupyter_notebook_config.py" 57 | ssh_private_key_url: "https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/files/ssh/id_rsa" 58 | ansible_cfg_url: "https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ansible.cfg" 59 | inventory_url: "https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/inventory" 60 | 61 | tasks: 62 | 63 | - name: Install necessary packages of Linux 64 | block: 65 | 66 | - name: Install general linux packages 67 | package: 68 | name: "{{ general_packages }}" 69 | state: present 70 | when: 71 | - general_packages is defined 72 | - ansible_pkg_mgr != "portage" 73 | 74 | - name: Install apk packages on Alpine Linux 75 | apk: 76 | name: "{{ apk_packages }}" 77 | state: present 78 | when: 79 | - apk_packages is defined 80 | - ansible_pkg_mgr == "apk" 81 | 82 | - name: Install apt packages on Debian and Ubuntu 83 | apt: 84 | name: "{{ apt_packages }}" 85 | state: present 86 | when: 87 | - apt_packages is defined 88 | - ansible_pkg_mgr == "apt" 89 | 90 | - name: Install pacman packages on Arch Linux 91 | pacman: 92 | name: "{{ pacman_packages }}" 93 | state: present 94 | when: 95 | - pacman_packages is defined 96 | - ansible_pkg_mgr == "pacman" 97 | 98 | - name: Install portage packages on Gentoo Linux 99 | portage: 100 | package: "{{ portage_packages }}" 101 | state: present 102 | when: 103 | - portage_packages is defined 104 | - ansible_pkg_mgr == "portage" 105 | 106 | - name: Install yum packages on CentOS 107 | yum: 108 | name: "{{ yum_packages }}" 109 | state: present 110 | when: 111 | - yum_packages is defined 112 | - ansible_pkg_mgr == "yum" 113 | 114 | - name: Install zypper packages on openSUSE 115 | zypper: 116 | name: "{{ zypper_packages }}" 117 | state: present 118 | when: 119 | - zypper_packages is defined 120 | - ansible_pkg_mgr == "zypper" 121 | 122 | - name: Install necessary packages of Python 123 | block: 124 | 125 | - name: Install general pip packages 126 | pip: 127 | name: "{{ pip_packages }}" 128 | state: present 129 | when: pip_packages is defined 130 | 131 | - name: Install pysqlite on gentoo 132 | pip: 133 | name: pysqlite 134 | state: present 135 | when: 136 | - ansible_pkg_mgr == "portage" 137 | 138 | - name: Upgrade six 139 | pip: 140 | name: six 141 | state: latest 142 | tags: skip_ansible_lint 143 | 144 | - name: Install and configuration Jupyter (application) 145 | block: 146 | 147 | - name: Install jupyter 148 | pip: 149 | name: jupyter 150 | version: 1.0.0 151 | state: present 152 | 153 | # Disable jupyter authentication token. (1/2) 154 | - name: Create `/root/.jupyter` directory 155 | file: 156 | path: /root/.jupyter 157 | state: directory 158 | mode: 0700 159 | 160 | # Disable jupyter authentication token. (2/2) 161 | - name: Get jupyter_notebook_config.py 162 | get_url: 163 | url: "{{ jupyter_notebook_config_py_url }}" 164 | dest: /root/.jupyter/jupyter_notebook_config.py 165 | mode: 0644 166 | checksum: md5:c663914a24281ddf10df6bc9e7238b07 167 | 168 | - name: Integrate Ansible and Jupyter 169 | block: 170 | 171 | - name: Create `/root/.ssh` directory 172 | file: 173 | path: /root/.ssh 174 | state: directory 175 | mode: 0700 176 | 177 | - name: Get ssh private key 178 | get_url: 179 | url: "{{ ssh_private_key_url }}" 180 | dest: /root/.ssh/id_rsa 181 | mode: 0600 182 | checksum: md5:6cc26e77bf23a9d72a51b22387bea61f 183 | 184 | - name: Get ansible.cfg file 185 | get_url: 186 | url: "{{ ansible_cfg_url }}" 187 | dest: /home/ 188 | mode: 0644 189 | 190 | - name: Get inventory file 191 | get_url: 192 | url: "{{ inventory_url }}" 193 | dest: /home/ 194 | mode: 0644 195 | 196 | # vim: ft=yaml.ansible : 197 | -------------------------------------------------------------------------------- /files/jupyter_notebook_config.py: -------------------------------------------------------------------------------- 1 | # Configuration file for jupyter-notebook. 2 | 3 | #------------------------------------------------------------------------------ 4 | # Application(SingletonConfigurable) configuration 5 | #------------------------------------------------------------------------------ 6 | 7 | ## This is an application. 8 | 9 | ## The date format used by logging formatters for %(asctime)s 10 | #c.Application.log_datefmt = '%Y-%m-%d %H:%M:%S' 11 | 12 | ## The Logging format template 13 | #c.Application.log_format = '[%(name)s]%(highlevel)s %(message)s' 14 | 15 | ## Set the log level by value or name. 16 | #c.Application.log_level = 30 17 | 18 | #------------------------------------------------------------------------------ 19 | # JupyterApp(Application) configuration 20 | #------------------------------------------------------------------------------ 21 | 22 | ## Base class for Jupyter applications 23 | 24 | ## Answer yes to any prompts. 25 | #c.JupyterApp.answer_yes = False 26 | 27 | ## Full path of a config file. 28 | #c.JupyterApp.config_file = u'' 29 | 30 | ## Specify a config file to load. 31 | #c.JupyterApp.config_file_name = u'' 32 | 33 | ## Generate default config file. 34 | #c.JupyterApp.generate_config = False 35 | 36 | #------------------------------------------------------------------------------ 37 | # NotebookApp(JupyterApp) configuration 38 | #------------------------------------------------------------------------------ 39 | 40 | ## Set the Access-Control-Allow-Credentials: true header 41 | #c.NotebookApp.allow_credentials = False 42 | 43 | ## Set the Access-Control-Allow-Origin header 44 | # 45 | # Use '*' to allow any origin to access your server. 46 | # 47 | # Takes precedence over allow_origin_pat. 48 | #c.NotebookApp.allow_origin = '' 49 | 50 | ## Use a regular expression for the Access-Control-Allow-Origin header 51 | # 52 | # Requests from an origin matching the expression will get replies with: 53 | # 54 | # Access-Control-Allow-Origin: origin 55 | # 56 | # where `origin` is the origin of the request. 57 | # 58 | # Ignored if allow_origin is set. 59 | #c.NotebookApp.allow_origin_pat = '' 60 | 61 | ## DEPRECATED use base_url 62 | #c.NotebookApp.base_project_url = '/' 63 | 64 | ## The base URL for the notebook server. 65 | # 66 | # Leading and trailing slashes can be omitted, and will automatically be added. 67 | #c.NotebookApp.base_url = '/' 68 | 69 | ## Specify what command to use to invoke a web browser when opening the notebook. 70 | # If not specified, the default browser will be determined by the `webbrowser` 71 | # standard library module, which allows setting of the BROWSER environment 72 | # variable to override it. 73 | #c.NotebookApp.browser = u'' 74 | 75 | ## The full path to an SSL/TLS certificate file. 76 | #c.NotebookApp.certfile = u'' 77 | 78 | ## The full path to a certificate authority certificate for SSL/TLS client 79 | # authentication. 80 | #c.NotebookApp.client_ca = u'' 81 | 82 | ## The config manager class to use 83 | #c.NotebookApp.config_manager_class = 'notebook.services.config.manager.ConfigManager' 84 | 85 | ## The notebook manager class to use. 86 | #c.NotebookApp.contents_manager_class = 'notebook.services.contents.filemanager.FileContentsManager' 87 | 88 | ## Extra keyword arguments to pass to `set_secure_cookie`. See tornado's 89 | # set_secure_cookie docs for details. 90 | #c.NotebookApp.cookie_options = {} 91 | 92 | ## The random bytes used to secure cookies. By default this is a new random 93 | # number every time you start the Notebook. Set it to a value in a config file 94 | # to enable logins to persist across server sessions. 95 | # 96 | # Note: Cookie secrets should be kept private, do not share config files with 97 | # cookie_secret stored in plaintext (you can read the value from a file). 98 | #c.NotebookApp.cookie_secret = '' 99 | 100 | ## The file where the cookie secret is stored. 101 | #c.NotebookApp.cookie_secret_file = u'' 102 | 103 | ## The default URL to redirect to from `/` 104 | #c.NotebookApp.default_url = '/tree' 105 | 106 | ## Disable cross-site-request-forgery protection 107 | # 108 | # Jupyter notebook 4.3.1 introduces protection from cross-site request 109 | # forgeries, requiring API requests to either: 110 | # 111 | # - originate from pages served by this server (validated with XSRF cookie and 112 | # token), or - authenticate with a token 113 | # 114 | # Some anonymous compute resources still desire the ability to run code, 115 | # completely without authentication. These services can disable all 116 | # authentication and security checks, with the full knowledge of what that 117 | # implies. 118 | #c.NotebookApp.disable_check_xsrf = False 119 | 120 | ## Whether to enable MathJax for typesetting math/TeX 121 | # 122 | # MathJax is the javascript library Jupyter uses to render math/LaTeX. It is 123 | # very large, so you may want to disable it if you have a slow internet 124 | # connection, or for offline use of the notebook. 125 | # 126 | # When disabled, equations etc. will appear as their untransformed TeX source. 127 | #c.NotebookApp.enable_mathjax = True 128 | 129 | ## extra paths to look for Javascript notebook extensions 130 | #c.NotebookApp.extra_nbextensions_path = [] 131 | 132 | ## Extra paths to search for serving static files. 133 | # 134 | # This allows adding javascript/css to be available from the notebook server 135 | # machine, or overriding individual files in the IPython 136 | #c.NotebookApp.extra_static_paths = [] 137 | 138 | ## Extra paths to search for serving jinja templates. 139 | # 140 | # Can be used to override templates from notebook.templates. 141 | #c.NotebookApp.extra_template_paths = [] 142 | 143 | ## 144 | #c.NotebookApp.file_to_run = '' 145 | 146 | ## Use minified JS file or not, mainly use during dev to avoid JS recompilation 147 | #c.NotebookApp.ignore_minified_js = False 148 | 149 | ## (bytes/sec) Maximum rate at which messages can be sent on iopub before they 150 | # are limited. 151 | #c.NotebookApp.iopub_data_rate_limit = 0 152 | 153 | ## (msg/sec) Maximum rate at which messages can be sent on iopub before they are 154 | # limited. 155 | #c.NotebookApp.iopub_msg_rate_limit = 0 156 | 157 | ## The IP address the notebook server will listen on. 158 | #c.NotebookApp.ip = 'localhost' 159 | 160 | ## Supply extra arguments that will be passed to Jinja environment. 161 | #c.NotebookApp.jinja_environment_options = {} 162 | 163 | ## Extra variables to supply to jinja templates when rendering. 164 | #c.NotebookApp.jinja_template_vars = {} 165 | 166 | ## The kernel manager class to use. 167 | #c.NotebookApp.kernel_manager_class = 'notebook.services.kernels.kernelmanager.MappingKernelManager' 168 | 169 | ## The kernel spec manager class to use. Should be a subclass of 170 | # `jupyter_client.kernelspec.KernelSpecManager`. 171 | # 172 | # The Api of KernelSpecManager is provisional and might change without warning 173 | # between this version of Jupyter and the next stable one. 174 | #c.NotebookApp.kernel_spec_manager_class = 'jupyter_client.kernelspec.KernelSpecManager' 175 | 176 | ## The full path to a private key file for usage with SSL/TLS. 177 | #c.NotebookApp.keyfile = u'' 178 | 179 | ## The login handler class to use. 180 | #c.NotebookApp.login_handler_class = 'notebook.auth.login.LoginHandler' 181 | 182 | ## The logout handler class to use. 183 | #c.NotebookApp.logout_handler_class = 'notebook.auth.logout.LogoutHandler' 184 | 185 | ## A custom url for MathJax.js. Should be in the form of a case-sensitive url to 186 | # MathJax, for example: /static/components/MathJax/MathJax.js 187 | #c.NotebookApp.mathjax_url = '' 188 | 189 | ## Dict of Python modules to load as notebook server extensions.Entry values can 190 | # be used to enable and disable the loading ofthe extensions. The extensions 191 | # will be loaded in alphabetical order. 192 | #c.NotebookApp.nbserver_extensions = {} 193 | 194 | ## The directory to use for notebooks and kernels. 195 | #c.NotebookApp.notebook_dir = u'' 196 | 197 | ## Whether to open in a browser after starting. The specific browser used is 198 | # platform dependent and determined by the python standard library `webbrowser` 199 | # module, unless it is overridden using the --browser (NotebookApp.browser) 200 | # configuration option. 201 | #c.NotebookApp.open_browser = True 202 | 203 | ## Hashed password to use for web authentication. 204 | # 205 | # To generate, type in a python/IPython shell: 206 | # 207 | # from notebook.auth import passwd; passwd() 208 | # 209 | # The string should be of the form type:salt:hashed-password. 210 | #c.NotebookApp.password = u'' 211 | 212 | ## The port the notebook server will listen on. 213 | #c.NotebookApp.port = 8888 214 | 215 | ## The number of additional ports to try if the specified port is not available. 216 | #c.NotebookApp.port_retries = 50 217 | 218 | ## DISABLED: use %pylab or %matplotlib in the notebook to enable matplotlib. 219 | #c.NotebookApp.pylab = 'disabled' 220 | 221 | ## (sec) Time window used to check the message and data rate limits. 222 | #c.NotebookApp.rate_limit_window = 1.0 223 | 224 | ## Reraise exceptions encountered loading server extensions? 225 | #c.NotebookApp.reraise_server_extension_failures = False 226 | 227 | ## DEPRECATED use the nbserver_extensions dict instead 228 | #c.NotebookApp.server_extensions = [] 229 | 230 | ## The session manager class to use. 231 | #c.NotebookApp.session_manager_class = 'notebook.services.sessions.sessionmanager.SessionManager' 232 | 233 | ## Supply SSL options for the tornado HTTPServer. See the tornado docs for 234 | # details. 235 | #c.NotebookApp.ssl_options = {} 236 | 237 | ## Token used for authenticating first-time connections to the server. 238 | # 239 | # When no password is enabled, the default is to generate a new, random token. 240 | # 241 | # Setting to an empty string disables authentication altogether, which is NOT 242 | # RECOMMENDED. 243 | #c.NotebookApp.token = '' 244 | c.NotebookApp.token = '' 245 | 246 | ## Supply overrides for the tornado.web.Application that the Jupyter notebook 247 | # uses. 248 | #c.NotebookApp.tornado_settings = {} 249 | 250 | ## Whether to trust or not X-Scheme/X-Forwarded-Proto and X-Real-Ip/X-Forwarded- 251 | # For headerssent by the upstream reverse proxy. Necessary if the proxy handles 252 | # SSL 253 | #c.NotebookApp.trust_xheaders = False 254 | 255 | ## DEPRECATED, use tornado_settings 256 | #c.NotebookApp.webapp_settings = {} 257 | 258 | ## The base URL for websockets, if it differs from the HTTP server (hint: it 259 | # almost certainly doesn't). 260 | # 261 | # Should be in the form of an HTTP origin: ws[s]://hostname[:port] 262 | #c.NotebookApp.websocket_url = '' 263 | 264 | #------------------------------------------------------------------------------ 265 | # ConnectionFileMixin(LoggingConfigurable) configuration 266 | #------------------------------------------------------------------------------ 267 | 268 | ## Mixin for configurable classes that work with connection files 269 | 270 | ## JSON file in which to store connection info [default: kernel-.json] 271 | # 272 | # This file will contain the IP, ports, and authentication key needed to connect 273 | # clients to this kernel. By default, this file will be created in the security 274 | # dir of the current profile, but can be specified by absolute path. 275 | #c.ConnectionFileMixin.connection_file = '' 276 | 277 | ## set the control (ROUTER) port [default: random] 278 | #c.ConnectionFileMixin.control_port = 0 279 | 280 | ## set the heartbeat port [default: random] 281 | #c.ConnectionFileMixin.hb_port = 0 282 | 283 | ## set the iopub (PUB) port [default: random] 284 | #c.ConnectionFileMixin.iopub_port = 0 285 | 286 | ## Set the kernel's IP address [default localhost]. If the IP address is 287 | # something other than localhost, then Consoles on other machines will be able 288 | # to connect to the Kernel, so be careful! 289 | #c.ConnectionFileMixin.ip = u'' 290 | 291 | ## set the shell (ROUTER) port [default: random] 292 | #c.ConnectionFileMixin.shell_port = 0 293 | 294 | ## set the stdin (ROUTER) port [default: random] 295 | #c.ConnectionFileMixin.stdin_port = 0 296 | 297 | ## 298 | #c.ConnectionFileMixin.transport = 'tcp' 299 | 300 | #------------------------------------------------------------------------------ 301 | # KernelManager(ConnectionFileMixin) configuration 302 | #------------------------------------------------------------------------------ 303 | 304 | ## Manages a single kernel in a subprocess on this host. 305 | # 306 | # This version starts kernels with Popen. 307 | 308 | ## Should we autorestart the kernel if it dies. 309 | #c.KernelManager.autorestart = True 310 | 311 | ## DEPRECATED: Use kernel_name instead. 312 | # 313 | # The Popen Command to launch the kernel. Override this if you have a custom 314 | # kernel. If kernel_cmd is specified in a configuration file, Jupyter does not 315 | # pass any arguments to the kernel, because it cannot make any assumptions about 316 | # the arguments that the kernel understands. In particular, this means that the 317 | # kernel does not receive the option --debug if it given on the Jupyter command 318 | # line. 319 | #c.KernelManager.kernel_cmd = [] 320 | 321 | #------------------------------------------------------------------------------ 322 | # Session(Configurable) configuration 323 | #------------------------------------------------------------------------------ 324 | 325 | ## Object for handling serialization and sending of messages. 326 | # 327 | # The Session object handles building messages and sending them with ZMQ sockets 328 | # or ZMQStream objects. Objects can communicate with each other over the 329 | # network via Session objects, and only need to work with the dict-based IPython 330 | # message spec. The Session will handle serialization/deserialization, security, 331 | # and metadata. 332 | # 333 | # Sessions support configurable serialization via packer/unpacker traits, and 334 | # signing with HMAC digests via the key/keyfile traits. 335 | # 336 | # Parameters ---------- 337 | # 338 | # debug : bool 339 | # whether to trigger extra debugging statements 340 | # packer/unpacker : str : 'json', 'pickle' or import_string 341 | # importstrings for methods to serialize message parts. If just 342 | # 'json' or 'pickle', predefined JSON and pickle packers will be used. 343 | # Otherwise, the entire importstring must be used. 344 | # 345 | # The functions must accept at least valid JSON input, and output *bytes*. 346 | # 347 | # For example, to use msgpack: 348 | # packer = 'msgpack.packb', unpacker='msgpack.unpackb' 349 | # pack/unpack : callables 350 | # You can also set the pack/unpack callables for serialization directly. 351 | # session : bytes 352 | # the ID of this Session object. The default is to generate a new UUID. 353 | # username : unicode 354 | # username added to message headers. The default is to ask the OS. 355 | # key : bytes 356 | # The key used to initialize an HMAC signature. If unset, messages 357 | # will not be signed or checked. 358 | # keyfile : filepath 359 | # The file containing a key. If this is set, `key` will be initialized 360 | # to the contents of the file. 361 | 362 | ## Threshold (in bytes) beyond which an object's buffer should be extracted to 363 | # avoid pickling. 364 | #c.Session.buffer_threshold = 1024 365 | 366 | ## Whether to check PID to protect against calls after fork. 367 | # 368 | # This check can be disabled if fork-safety is handled elsewhere. 369 | #c.Session.check_pid = True 370 | 371 | ## Threshold (in bytes) beyond which a buffer should be sent without copying. 372 | #c.Session.copy_threshold = 65536 373 | 374 | ## Debug output in the Session 375 | #c.Session.debug = False 376 | 377 | ## The maximum number of digests to remember. 378 | # 379 | # The digest history will be culled when it exceeds this value. 380 | #c.Session.digest_history_size = 65536 381 | 382 | ## The maximum number of items for a container to be introspected for custom 383 | # serialization. Containers larger than this are pickled outright. 384 | #c.Session.item_threshold = 64 385 | 386 | ## execution key, for signing messages. 387 | #c.Session.key = '' 388 | 389 | ## path to file containing execution key. 390 | #c.Session.keyfile = '' 391 | 392 | ## Metadata dictionary, which serves as the default top-level metadata dict for 393 | # each message. 394 | #c.Session.metadata = {} 395 | 396 | ## The name of the packer for serializing messages. Should be one of 'json', 397 | # 'pickle', or an import name for a custom callable serializer. 398 | #c.Session.packer = 'json' 399 | 400 | ## The UUID identifying this session. 401 | #c.Session.session = u'' 402 | 403 | ## The digest scheme used to construct the message signatures. Must have the form 404 | # 'hmac-HASH'. 405 | #c.Session.signature_scheme = 'hmac-sha256' 406 | 407 | ## The name of the unpacker for unserializing messages. Only used with custom 408 | # functions for `packer`. 409 | #c.Session.unpacker = 'json' 410 | 411 | ## Username for the Session. Default is your system username. 412 | #c.Session.username = u'username' 413 | 414 | #------------------------------------------------------------------------------ 415 | # MultiKernelManager(LoggingConfigurable) configuration 416 | #------------------------------------------------------------------------------ 417 | 418 | ## A class for managing multiple kernels. 419 | 420 | ## The name of the default kernel to start 421 | #c.MultiKernelManager.default_kernel_name = 'python2' 422 | 423 | ## The kernel manager class. This is configurable to allow subclassing of the 424 | # KernelManager for customized behavior. 425 | #c.MultiKernelManager.kernel_manager_class = 'jupyter_client.ioloop.IOLoopKernelManager' 426 | 427 | #------------------------------------------------------------------------------ 428 | # MappingKernelManager(MultiKernelManager) configuration 429 | #------------------------------------------------------------------------------ 430 | 431 | ## A KernelManager that handles notebook mapping and HTTP error handling 432 | 433 | ## 434 | #c.MappingKernelManager.root_dir = u'' 435 | 436 | #------------------------------------------------------------------------------ 437 | # ContentsManager(LoggingConfigurable) configuration 438 | #------------------------------------------------------------------------------ 439 | 440 | ## Base class for serving files and directories. 441 | # 442 | # This serves any text or binary file, as well as directories, with special 443 | # handling for JSON notebook documents. 444 | # 445 | # Most APIs take a path argument, which is always an API-style unicode path, and 446 | # always refers to a directory. 447 | # 448 | # - unicode, not url-escaped 449 | # - '/'-separated 450 | # - leading and trailing '/' will be stripped 451 | # - if unspecified, path defaults to '', 452 | # indicating the root path. 453 | 454 | ## 455 | #c.ContentsManager.checkpoints = None 456 | 457 | ## 458 | #c.ContentsManager.checkpoints_class = 'notebook.services.contents.checkpoints.Checkpoints' 459 | 460 | ## 461 | #c.ContentsManager.checkpoints_kwargs = {} 462 | 463 | ## Glob patterns to hide in file and directory listings. 464 | #c.ContentsManager.hide_globs = [u'__pycache__', '*.pyc', '*.pyo', '.DS_Store', '*.so', '*.dylib', '*~'] 465 | 466 | ## Python callable or importstring thereof 467 | # 468 | # To be called on a contents model prior to save. 469 | # 470 | # This can be used to process the structure, such as removing notebook outputs 471 | # or other side effects that should not be saved. 472 | # 473 | # It will be called as (all arguments passed by keyword):: 474 | # 475 | # hook(path=path, model=model, contents_manager=self) 476 | # 477 | # - model: the model to be saved. Includes file contents. 478 | # Modifying this dict will affect the file that is stored. 479 | # - path: the API path of the save destination 480 | # - contents_manager: this ContentsManager instance 481 | #c.ContentsManager.pre_save_hook = None 482 | 483 | ## The base name used when creating untitled directories. 484 | #c.ContentsManager.untitled_directory = 'Untitled Folder' 485 | 486 | ## The base name used when creating untitled files. 487 | #c.ContentsManager.untitled_file = 'untitled' 488 | 489 | ## The base name used when creating untitled notebooks. 490 | #c.ContentsManager.untitled_notebook = 'Untitled' 491 | 492 | #------------------------------------------------------------------------------ 493 | # FileManagerMixin(Configurable) configuration 494 | #------------------------------------------------------------------------------ 495 | 496 | ## Mixin for ContentsAPI classes that interact with the filesystem. 497 | # 498 | # Provides facilities for reading, writing, and copying both notebooks and 499 | # generic files. 500 | # 501 | # Shared by FileContentsManager and FileCheckpoints. 502 | # 503 | # Note ---- Classes using this mixin must provide the following attributes: 504 | # 505 | # root_dir : unicode 506 | # A directory against against which API-style paths are to be resolved. 507 | # 508 | # log : logging.Logger 509 | 510 | ## By default notebooks are saved on disk on a temporary file and then if 511 | # succefully written, it replaces the old ones. This procedure, namely 512 | # 'atomic_writing', causes some bugs on file system whitout operation order 513 | # enforcement (like some networked fs). If set to False, the new notebook is 514 | # written directly on the old one which could fail (eg: full filesystem or quota 515 | # ) 516 | #c.FileManagerMixin.use_atomic_writing = True 517 | 518 | #------------------------------------------------------------------------------ 519 | # FileContentsManager(FileManagerMixin,ContentsManager) configuration 520 | #------------------------------------------------------------------------------ 521 | 522 | ## Python callable or importstring thereof 523 | # 524 | # to be called on the path of a file just saved. 525 | # 526 | # This can be used to process the file on disk, such as converting the notebook 527 | # to a script or HTML via nbconvert. 528 | # 529 | # It will be called as (all arguments passed by keyword):: 530 | # 531 | # hook(os_path=os_path, model=model, contents_manager=instance) 532 | # 533 | # - path: the filesystem path to the file just written - model: the model 534 | # representing the file - contents_manager: this ContentsManager instance 535 | #c.FileContentsManager.post_save_hook = None 536 | 537 | ## 538 | #c.FileContentsManager.root_dir = u'' 539 | 540 | ## DEPRECATED, use post_save_hook. Will be removed in Notebook 5.0 541 | #c.FileContentsManager.save_script = False 542 | 543 | #------------------------------------------------------------------------------ 544 | # NotebookNotary(LoggingConfigurable) configuration 545 | #------------------------------------------------------------------------------ 546 | 547 | ## A class for computing and verifying notebook signatures. 548 | 549 | ## The hashing algorithm used to sign notebooks. 550 | #c.NotebookNotary.algorithm = 'sha256' 551 | 552 | ## The number of notebook signatures to cache. When the number of signatures 553 | # exceeds this value, the oldest 25% of signatures will be culled. 554 | #c.NotebookNotary.cache_size = 65535 555 | 556 | ## The sqlite file in which to store notebook signatures. By default, this will 557 | # be in your Jupyter data directory. You can set it to ':memory:' to disable 558 | # sqlite writing to the filesystem. 559 | #c.NotebookNotary.db_file = u'' 560 | 561 | ## The secret key with which notebooks are signed. 562 | #c.NotebookNotary.secret = '' 563 | 564 | ## The file where the secret key is stored. 565 | #c.NotebookNotary.secret_file = u'' 566 | 567 | #------------------------------------------------------------------------------ 568 | # KernelSpecManager(LoggingConfigurable) configuration 569 | #------------------------------------------------------------------------------ 570 | 571 | ## If there is no Python kernelspec registered and the IPython kernel is 572 | # available, ensure it is added to the spec list. 573 | #c.KernelSpecManager.ensure_native_kernel = True 574 | 575 | ## The kernel spec class. This is configurable to allow subclassing of the 576 | # KernelSpecManager for customized behavior. 577 | #c.KernelSpecManager.kernel_spec_class = 'jupyter_client.kernelspec.KernelSpec' 578 | 579 | ## Whitelist of allowed kernel names. 580 | # 581 | # By default, all installed kernels are allowed. 582 | #c.KernelSpecManager.whitelist = set([]) 583 | -------------------------------------------------------------------------------- /ipynb/ansible_on_jupyter_archlinux.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": { 6 | "collapsed": true 7 | }, 8 | "source": [ 9 | "# Run the Ansible on Jupyter Notebook x Arch Linux\n", 10 | "\n", 11 | "- Author: Chu-Siang Lai / chusiang (at) drx.tw\n", 12 | "- GitHub: [chusiang/ansible-jupyter.dockerfile](https://github.com/chusiang/ansible-jupyter.dockerfile)\n", 13 | "- Docker Hub: [chusiang/ansible-jupyter](https://hub.docker.com/r/chusiang/ansible-jupyter/)\n" 14 | ] 15 | }, 16 | { 17 | "cell_type": "markdown", 18 | "metadata": {}, 19 | "source": [ 20 | "Table of contexts:\n", 21 | "1. [Operating-System](#Operating-System)\n", 22 | "1. [Ad-Hoc-commands](#Ad-Hoc-commands)\n", 23 | "1. [Playbooks](#Playbooks)" 24 | ] 25 | }, 26 | { 27 | "cell_type": "markdown", 28 | "metadata": {}, 29 | "source": [ 30 | "Modified." 31 | ] 32 | }, 33 | { 34 | "cell_type": "code", 35 | "execution_count": 1, 36 | "metadata": {}, 37 | "outputs": [ 38 | { 39 | "name": "stdout", 40 | "output_type": "stream", 41 | "text": [ 42 | "Mon Jun 18 07:57:10 UTC 2018\r\n" 43 | ] 44 | } 45 | ], 46 | "source": [ 47 | "!date" 48 | ] 49 | }, 50 | { 51 | "cell_type": "markdown", 52 | "metadata": {}, 53 | "source": [ 54 | "## Operating System\n", 55 | "\n", 56 | "Check the runtime user." 57 | ] 58 | }, 59 | { 60 | "cell_type": "code", 61 | "execution_count": 2, 62 | "metadata": {}, 63 | "outputs": [ 64 | { 65 | "name": "stdout", 66 | "output_type": "stream", 67 | "text": [ 68 | "root\r\n" 69 | ] 70 | } 71 | ], 72 | "source": [ 73 | "!whoami" 74 | ] 75 | }, 76 | { 77 | "cell_type": "markdown", 78 | "metadata": {}, 79 | "source": [ 80 | "Show Linux distribution." 81 | ] 82 | }, 83 | { 84 | "cell_type": "code", 85 | "execution_count": 3, 86 | "metadata": {}, 87 | "outputs": [ 88 | { 89 | "name": "stdout", 90 | "output_type": "stream", 91 | "text": [ 92 | "Arch Linux \\r (\\l)\r\n", 93 | "\r\n" 94 | ] 95 | } 96 | ], 97 | "source": [ 98 | "!cat /etc/issue" 99 | ] 100 | }, 101 | { 102 | "cell_type": "markdown", 103 | "metadata": {}, 104 | "source": [ 105 | "Workspace." 106 | ] 107 | }, 108 | { 109 | "cell_type": "code", 110 | "execution_count": 4, 111 | "metadata": {}, 112 | "outputs": [ 113 | { 114 | "name": "stdout", 115 | "output_type": "stream", 116 | "text": [ 117 | "/home\r\n" 118 | ] 119 | } 120 | ], 121 | "source": [ 122 | "!pwd" 123 | ] 124 | }, 125 | { 126 | "cell_type": "markdown", 127 | "metadata": {}, 128 | "source": [ 129 | "Show Python version." 130 | ] 131 | }, 132 | { 133 | "cell_type": "code", 134 | "execution_count": 5, 135 | "metadata": {}, 136 | "outputs": [ 137 | { 138 | "name": "stdout", 139 | "output_type": "stream", 140 | "text": [ 141 | "Python 3.6.5\r\n" 142 | ] 143 | } 144 | ], 145 | "source": [ 146 | "!python --version" 147 | ] 148 | }, 149 | { 150 | "cell_type": "markdown", 151 | "metadata": {}, 152 | "source": [ 153 | "Show pip version." 154 | ] 155 | }, 156 | { 157 | "cell_type": "code", 158 | "execution_count": 6, 159 | "metadata": {}, 160 | "outputs": [ 161 | { 162 | "name": "stdout", 163 | "output_type": "stream", 164 | "text": [ 165 | "pip 10.0.1 from /usr/lib/python3.6/site-packages/pip (python 3.6)\r\n" 166 | ] 167 | } 168 | ], 169 | "source": [ 170 | "!pip --version" 171 | ] 172 | }, 173 | { 174 | "cell_type": "markdown", 175 | "metadata": {}, 176 | "source": [ 177 | "Show Ansible version." 178 | ] 179 | }, 180 | { 181 | "cell_type": "code", 182 | "execution_count": 7, 183 | "metadata": {}, 184 | "outputs": [ 185 | { 186 | "name": "stdout", 187 | "output_type": "stream", 188 | "text": [ 189 | "ansible 2.5.4\r\n", 190 | " config file = /home/ansible.cfg\r\n", 191 | " configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']\r\n", 192 | " ansible python module location = /usr/lib/python3.6/site-packages/ansible\r\n", 193 | " executable location = /usr/sbin/ansible\r\n", 194 | " python version = 3.6.5 (default, May 11 2018, 04:00:52) [GCC 8.1.0]\r\n" 195 | ] 196 | } 197 | ], 198 | "source": [ 199 | "!ansible --version" 200 | ] 201 | }, 202 | { 203 | "cell_type": "markdown", 204 | "metadata": {}, 205 | "source": [ 206 | "Show Jupyter version." 207 | ] 208 | }, 209 | { 210 | "cell_type": "code", 211 | "execution_count": 8, 212 | "metadata": {}, 213 | "outputs": [ 214 | { 215 | "name": "stdout", 216 | "output_type": "stream", 217 | "text": [ 218 | "4.4.0\r\n" 219 | ] 220 | } 221 | ], 222 | "source": [ 223 | "!jupyter --version" 224 | ] 225 | }, 226 | { 227 | "cell_type": "markdown", 228 | "metadata": {}, 229 | "source": [ 230 | "## Ansible\n", 231 | "\n", 232 | "Check the playbook syntax, if you see the `[WARNING]`, please fix something, first." 233 | ] 234 | }, 235 | { 236 | "cell_type": "code", 237 | "execution_count": 9, 238 | "metadata": {}, 239 | "outputs": [ 240 | { 241 | "name": "stdout", 242 | "output_type": "stream", 243 | "text": [ 244 | "\r\n", 245 | "playbook: setup_jupyter.yml\r\n" 246 | ] 247 | } 248 | ], 249 | "source": [ 250 | "!ansible-playbook --syntax-check setup_jupyter.yml" 251 | ] 252 | }, 253 | { 254 | "cell_type": "markdown", 255 | "metadata": {}, 256 | "source": [ 257 | "### Ad-Hoc commands\n", 258 | "\n", 259 | "ping the localhost." 260 | ] 261 | }, 262 | { 263 | "cell_type": "code", 264 | "execution_count": 10, 265 | "metadata": {}, 266 | "outputs": [ 267 | { 268 | "name": "stdout", 269 | "output_type": "stream", 270 | "text": [ 271 | "\u001b[0;32mlocalhost | SUCCESS => {\u001b[0m\r\n", 272 | "\u001b[0;32m \"changed\": false,\u001b[0m\r\n", 273 | "\u001b[0;32m \"ping\": \"pong\"\u001b[0m\r\n", 274 | "\u001b[0;32m}\u001b[0m\r\n" 275 | ] 276 | } 277 | ], 278 | "source": [ 279 | "!ansible localhost -m ping" 280 | ] 281 | }, 282 | { 283 | "cell_type": "markdown", 284 | "metadata": {}, 285 | "source": [ 286 | "Get the facts with `setup` module." 287 | ] 288 | }, 289 | { 290 | "cell_type": "code", 291 | "execution_count": 11, 292 | "metadata": { 293 | "scrolled": false 294 | }, 295 | "outputs": [ 296 | { 297 | "name": "stdout", 298 | "output_type": "stream", 299 | "text": [ 300 | "\u001b[0;32mlocalhost | SUCCESS => {\u001b[0m\r\n", 301 | "\u001b[0;32m \"ansible_facts\": {\u001b[0m\r\n", 302 | "\u001b[0;32m \"ansible_apparmor\": {\u001b[0m\r\n", 303 | "\u001b[0;32m \"status\": \"disabled\"\u001b[0m\r\n", 304 | "\u001b[0;32m },\u001b[0m\r\n", 305 | "\u001b[0;32m \"ansible_architecture\": \"x86_64\",\u001b[0m\r\n", 306 | "\u001b[0;32m \"ansible_bios_date\": \"03/14/2014\",\u001b[0m\r\n", 307 | "\u001b[0;32m \"ansible_bios_version\": \"1.00\",\u001b[0m\r\n", 308 | "\u001b[0;32m \"ansible_cmdline\": {\u001b[0m\r\n", 309 | "\u001b[0;32m \"BOOT_IMAGE\": \"/boot/kernel\",\u001b[0m\r\n", 310 | "\u001b[0;32m \"console\": \"ttyS0\",\u001b[0m\r\n", 311 | "\u001b[0;32m \"ntp\": \"gateway\",\u001b[0m\r\n", 312 | "\u001b[0;32m \"page_poison\": \"1\",\u001b[0m\r\n", 313 | "\u001b[0;32m \"panic\": \"1\",\u001b[0m\r\n", 314 | "\u001b[0;32m \"root\": \"/dev/sr0\",\u001b[0m\r\n", 315 | "\u001b[0;32m \"text\": true,\u001b[0m\r\n", 316 | "\u001b[0;32m \"vsyscall\": \"emulate\"\u001b[0m\r\n", 317 | "\u001b[0;32m },\u001b[0m\r\n", 318 | "\u001b[0;32m \"ansible_date_time\": {\u001b[0m\r\n", 319 | "\u001b[0;32m \"date\": \"2018-06-18\",\u001b[0m\r\n", 320 | "\u001b[0;32m \"day\": \"18\",\u001b[0m\r\n", 321 | "\u001b[0;32m \"epoch\": \"1529308658\",\u001b[0m\r\n", 322 | "\u001b[0;32m \"hour\": \"07\",\u001b[0m\r\n", 323 | "\u001b[0;32m \"iso8601\": \"2018-06-18T07:57:38Z\",\u001b[0m\r\n", 324 | "\u001b[0;32m \"iso8601_basic\": \"20180618T075738125998\",\u001b[0m\r\n", 325 | "\u001b[0;32m \"iso8601_basic_short\": \"20180618T075738\",\u001b[0m\r\n", 326 | "\u001b[0;32m \"iso8601_micro\": \"2018-06-18T07:57:38.126107Z\",\u001b[0m\r\n", 327 | "\u001b[0;32m \"minute\": \"57\",\u001b[0m\r\n", 328 | "\u001b[0;32m \"month\": \"06\",\u001b[0m\r\n", 329 | "\u001b[0;32m \"second\": \"38\",\u001b[0m\r\n", 330 | "\u001b[0;32m \"time\": \"07:57:38\",\u001b[0m\r\n", 331 | "\u001b[0;32m \"tz\": \"UTC\",\u001b[0m\r\n", 332 | "\u001b[0;32m \"tz_offset\": \"+0000\",\u001b[0m\r\n", 333 | "\u001b[0;32m \"weekday\": \"Monday\",\u001b[0m\r\n", 334 | "\u001b[0;32m \"weekday_number\": \"1\",\u001b[0m\r\n", 335 | "\u001b[0;32m \"weeknumber\": \"25\",\u001b[0m\r\n", 336 | "\u001b[0;32m \"year\": \"2018\"\u001b[0m\r\n", 337 | "\u001b[0;32m },\u001b[0m\r\n", 338 | "\u001b[0;32m \"ansible_device_links\": {\u001b[0m\r\n", 339 | "\u001b[0;32m \"ids\": {},\u001b[0m\r\n", 340 | "\u001b[0;32m \"labels\": {},\u001b[0m\r\n", 341 | "\u001b[0;32m \"masters\": {},\u001b[0m\r\n", 342 | "\u001b[0;32m \"uuids\": {}\u001b[0m\r\n", 343 | "\u001b[0;32m },\u001b[0m\r\n", 344 | "\u001b[0;32m \"ansible_devices\": {\u001b[0m\r\n", 345 | "\u001b[0;32m \"loop0\": {\u001b[0m\r\n", 346 | "\u001b[0;32m \"holders\": [],\u001b[0m\r\n", 347 | "\u001b[0;32m \"host\": \"\",\u001b[0m\r\n", 348 | "\u001b[0;32m \"links\": {\u001b[0m\r\n", 349 | "\u001b[0;32m \"ids\": [],\u001b[0m\r\n", 350 | "\u001b[0;32m \"labels\": [],\u001b[0m\r\n", 351 | "\u001b[0;32m \"masters\": [],\u001b[0m\r\n", 352 | "\u001b[0;32m \"uuids\": []\u001b[0m\r\n", 353 | "\u001b[0;32m },\u001b[0m\r\n", 354 | "\u001b[0;32m \"model\": null,\u001b[0m\r\n", 355 | "\u001b[0;32m \"partitions\": {},\u001b[0m\r\n", 356 | "\u001b[0;32m \"removable\": \"0\",\u001b[0m\r\n", 357 | "\u001b[0;32m \"rotational\": \"1\",\u001b[0m\r\n", 358 | "\u001b[0;32m \"sas_address\": null,\u001b[0m\r\n", 359 | "\u001b[0;32m \"sas_device_handle\": null,\u001b[0m\r\n", 360 | "\u001b[0;32m \"scheduler_mode\": \"\",\u001b[0m\r\n", 361 | "\u001b[0;32m \"sectors\": \"0\",\u001b[0m\r\n", 362 | "\u001b[0;32m \"sectorsize\": \"512\",\u001b[0m\r\n", 363 | "\u001b[0;32m \"size\": \"0.00 Bytes\",\u001b[0m\r\n", 364 | "\u001b[0;32m \"support_discard\": \"0\",\u001b[0m\r\n", 365 | "\u001b[0;32m \"vendor\": null,\u001b[0m\r\n", 366 | "\u001b[0;32m \"virtual\": 1\u001b[0m\r\n", 367 | "\u001b[0;32m },\u001b[0m\r\n", 368 | "\u001b[0;32m \"loop1\": {\u001b[0m\r\n", 369 | "\u001b[0;32m \"holders\": [],\u001b[0m\r\n", 370 | "\u001b[0;32m \"host\": \"\",\u001b[0m\r\n", 371 | "\u001b[0;32m \"links\": {\u001b[0m\r\n", 372 | "\u001b[0;32m \"ids\": [],\u001b[0m\r\n", 373 | "\u001b[0;32m \"labels\": [],\u001b[0m\r\n", 374 | "\u001b[0;32m \"masters\": [],\u001b[0m\r\n", 375 | "\u001b[0;32m \"uuids\": []\u001b[0m\r\n", 376 | "\u001b[0;32m },\u001b[0m\r\n", 377 | "\u001b[0;32m \"model\": null,\u001b[0m\r\n", 378 | "\u001b[0;32m \"partitions\": {},\u001b[0m\r\n", 379 | "\u001b[0;32m \"removable\": \"0\",\u001b[0m\r\n", 380 | "\u001b[0;32m \"rotational\": \"1\",\u001b[0m\r\n", 381 | "\u001b[0;32m \"sas_address\": null,\u001b[0m\r\n", 382 | "\u001b[0;32m \"sas_device_handle\": null,\u001b[0m\r\n", 383 | "\u001b[0;32m \"scheduler_mode\": \"\",\u001b[0m\r\n", 384 | "\u001b[0;32m \"sectors\": \"0\",\u001b[0m\r\n", 385 | "\u001b[0;32m \"sectorsize\": \"512\",\u001b[0m\r\n", 386 | "\u001b[0;32m \"size\": \"0.00 Bytes\",\u001b[0m\r\n", 387 | "\u001b[0;32m \"support_discard\": \"0\",\u001b[0m\r\n", 388 | "\u001b[0;32m \"vendor\": null,\u001b[0m\r\n", 389 | "\u001b[0;32m \"virtual\": 1\u001b[0m\r\n", 390 | "\u001b[0;32m },\u001b[0m\r\n", 391 | "\u001b[0;32m \"loop2\": {\u001b[0m\r\n", 392 | "\u001b[0;32m \"holders\": [],\u001b[0m\r\n", 393 | "\u001b[0;32m \"host\": \"\",\u001b[0m\r\n", 394 | "\u001b[0;32m \"links\": {\u001b[0m\r\n", 395 | "\u001b[0;32m \"ids\": [],\u001b[0m\r\n", 396 | "\u001b[0;32m \"labels\": [],\u001b[0m\r\n", 397 | "\u001b[0;32m \"masters\": [],\u001b[0m\r\n", 398 | "\u001b[0;32m \"uuids\": []\u001b[0m\r\n", 399 | "\u001b[0;32m },\u001b[0m\r\n", 400 | "\u001b[0;32m \"model\": null,\u001b[0m\r\n", 401 | "\u001b[0;32m \"partitions\": {},\u001b[0m\r\n", 402 | "\u001b[0;32m \"removable\": \"0\",\u001b[0m\r\n", 403 | "\u001b[0;32m \"rotational\": \"1\",\u001b[0m\r\n", 404 | "\u001b[0;32m \"sas_address\": null,\u001b[0m\r\n", 405 | "\u001b[0;32m \"sas_device_handle\": null,\u001b[0m\r\n", 406 | "\u001b[0;32m \"scheduler_mode\": \"\",\u001b[0m\r\n", 407 | "\u001b[0;32m \"sectors\": \"0\",\u001b[0m\r\n", 408 | "\u001b[0;32m \"sectorsize\": \"512\",\u001b[0m\r\n", 409 | "\u001b[0;32m \"size\": \"0.00 Bytes\",\u001b[0m\r\n", 410 | "\u001b[0;32m \"support_discard\": \"0\",\u001b[0m\r\n", 411 | "\u001b[0;32m \"vendor\": null,\u001b[0m\r\n", 412 | "\u001b[0;32m \"virtual\": 1\u001b[0m\r\n", 413 | "\u001b[0;32m },\u001b[0m\r\n", 414 | "\u001b[0;32m \"loop3\": {\u001b[0m\r\n", 415 | "\u001b[0;32m \"holders\": [],\u001b[0m\r\n", 416 | "\u001b[0;32m \"host\": \"\",\u001b[0m\r\n", 417 | "\u001b[0;32m \"links\": {\u001b[0m\r\n", 418 | "\u001b[0;32m \"ids\": [],\u001b[0m\r\n", 419 | "\u001b[0;32m \"labels\": [],\u001b[0m\r\n", 420 | "\u001b[0;32m \"masters\": [],\u001b[0m\r\n", 421 | "\u001b[0;32m \"uuids\": []\u001b[0m\r\n", 422 | "\u001b[0;32m },\u001b[0m\r\n", 423 | "\u001b[0;32m \"model\": null,\u001b[0m\r\n", 424 | "\u001b[0;32m \"partitions\": {},\u001b[0m\r\n", 425 | "\u001b[0;32m \"removable\": \"0\",\u001b[0m\r\n", 426 | "\u001b[0;32m \"rotational\": \"1\",\u001b[0m\r\n", 427 | "\u001b[0;32m \"sas_address\": null,\u001b[0m\r\n", 428 | "\u001b[0;32m \"sas_device_handle\": null,\u001b[0m\r\n", 429 | "\u001b[0;32m \"scheduler_mode\": \"\",\u001b[0m\r\n", 430 | "\u001b[0;32m \"sectors\": \"0\",\u001b[0m\r\n", 431 | "\u001b[0;32m \"sectorsize\": \"512\",\u001b[0m\r\n", 432 | "\u001b[0;32m \"size\": \"0.00 Bytes\",\u001b[0m\r\n", 433 | "\u001b[0;32m \"support_discard\": \"0\",\u001b[0m\r\n", 434 | "\u001b[0;32m \"vendor\": null,\u001b[0m\r\n", 435 | "\u001b[0;32m \"virtual\": 1\u001b[0m\r\n", 436 | "\u001b[0;32m },\u001b[0m\r\n", 437 | "\u001b[0;32m \"loop4\": {\u001b[0m\r\n", 438 | "\u001b[0;32m \"holders\": [],\u001b[0m\r\n", 439 | "\u001b[0;32m \"host\": \"\",\u001b[0m\r\n", 440 | "\u001b[0;32m \"links\": {\u001b[0m\r\n", 441 | "\u001b[0;32m \"ids\": [],\u001b[0m\r\n", 442 | "\u001b[0;32m \"labels\": [],\u001b[0m\r\n", 443 | "\u001b[0;32m \"masters\": [],\u001b[0m\r\n", 444 | "\u001b[0;32m \"uuids\": []\u001b[0m\r\n", 445 | "\u001b[0;32m },\u001b[0m\r\n", 446 | "\u001b[0;32m \"model\": null,\u001b[0m\r\n", 447 | "\u001b[0;32m \"partitions\": {},\u001b[0m\r\n", 448 | "\u001b[0;32m \"removable\": \"0\",\u001b[0m\r\n", 449 | "\u001b[0;32m \"rotational\": \"1\",\u001b[0m\r\n", 450 | "\u001b[0;32m \"sas_address\": null,\u001b[0m\r\n", 451 | "\u001b[0;32m \"sas_device_handle\": null,\u001b[0m\r\n", 452 | "\u001b[0;32m \"scheduler_mode\": \"\",\u001b[0m\r\n", 453 | "\u001b[0;32m \"sectors\": \"0\",\u001b[0m\r\n", 454 | "\u001b[0;32m \"sectorsize\": \"512\",\u001b[0m\r\n", 455 | "\u001b[0;32m \"size\": \"0.00 Bytes\",\u001b[0m\r\n", 456 | "\u001b[0;32m \"support_discard\": \"0\",\u001b[0m\r\n", 457 | "\u001b[0;32m \"vendor\": null,\u001b[0m\r\n", 458 | "\u001b[0;32m \"virtual\": 1\u001b[0m\r\n", 459 | "\u001b[0;32m },\u001b[0m\r\n", 460 | "\u001b[0;32m \"loop5\": {\u001b[0m\r\n", 461 | "\u001b[0;32m \"holders\": [],\u001b[0m\r\n", 462 | "\u001b[0;32m \"host\": \"\",\u001b[0m\r\n", 463 | "\u001b[0;32m \"links\": {\u001b[0m\r\n", 464 | "\u001b[0;32m \"ids\": [],\u001b[0m\r\n", 465 | "\u001b[0;32m \"labels\": [],\u001b[0m\r\n", 466 | "\u001b[0;32m \"masters\": [],\u001b[0m\r\n", 467 | "\u001b[0;32m \"uuids\": []\u001b[0m\r\n", 468 | "\u001b[0;32m },\u001b[0m\r\n", 469 | "\u001b[0;32m \"model\": null,\u001b[0m\r\n", 470 | "\u001b[0;32m \"partitions\": {},\u001b[0m\r\n", 471 | "\u001b[0;32m \"removable\": \"0\",\u001b[0m\r\n", 472 | "\u001b[0;32m \"rotational\": \"1\",\u001b[0m\r\n", 473 | "\u001b[0;32m \"sas_address\": null,\u001b[0m\r\n", 474 | "\u001b[0;32m \"sas_device_handle\": null,\u001b[0m\r\n", 475 | "\u001b[0;32m \"scheduler_mode\": \"\",\u001b[0m\r\n", 476 | "\u001b[0;32m \"sectors\": \"0\",\u001b[0m\r\n", 477 | "\u001b[0;32m \"sectorsize\": \"512\",\u001b[0m\r\n", 478 | "\u001b[0;32m \"size\": \"0.00 Bytes\",\u001b[0m\r\n", 479 | "\u001b[0;32m \"support_discard\": \"0\",\u001b[0m\r\n", 480 | "\u001b[0;32m \"vendor\": null,\u001b[0m\r\n", 481 | "\u001b[0;32m \"virtual\": 1\u001b[0m\r\n", 482 | "\u001b[0;32m },\u001b[0m\r\n", 483 | "\u001b[0;32m \"loop6\": {\u001b[0m\r\n", 484 | "\u001b[0;32m \"holders\": [],\u001b[0m\r\n", 485 | "\u001b[0;32m \"host\": \"\",\u001b[0m\r\n", 486 | "\u001b[0;32m \"links\": {\u001b[0m\r\n", 487 | "\u001b[0;32m \"ids\": [],\u001b[0m\r\n", 488 | "\u001b[0;32m \"labels\": [],\u001b[0m\r\n", 489 | "\u001b[0;32m \"masters\": [],\u001b[0m\r\n", 490 | "\u001b[0;32m \"uuids\": []\u001b[0m\r\n", 491 | "\u001b[0;32m },\u001b[0m\r\n", 492 | "\u001b[0;32m \"model\": null,\u001b[0m\r\n", 493 | "\u001b[0;32m \"partitions\": {},\u001b[0m\r\n", 494 | "\u001b[0;32m \"removable\": \"0\",\u001b[0m\r\n", 495 | "\u001b[0;32m \"rotational\": \"1\",\u001b[0m\r\n", 496 | "\u001b[0;32m \"sas_address\": null,\u001b[0m\r\n", 497 | "\u001b[0;32m \"sas_device_handle\": null,\u001b[0m\r\n", 498 | "\u001b[0;32m \"scheduler_mode\": \"\",\u001b[0m\r\n", 499 | "\u001b[0;32m \"sectors\": \"0\",\u001b[0m\r\n", 500 | "\u001b[0;32m \"sectorsize\": \"512\",\u001b[0m\r\n", 501 | "\u001b[0;32m \"size\": \"0.00 Bytes\",\u001b[0m\r\n", 502 | "\u001b[0;32m \"support_discard\": \"0\",\u001b[0m\r\n", 503 | "\u001b[0;32m \"vendor\": null,\u001b[0m\r\n", 504 | "\u001b[0;32m \"virtual\": 1\u001b[0m\r\n", 505 | "\u001b[0;32m },\u001b[0m\r\n", 506 | "\u001b[0;32m \"loop7\": {\u001b[0m\r\n", 507 | "\u001b[0;32m \"holders\": [],\u001b[0m\r\n", 508 | "\u001b[0;32m \"host\": \"\",\u001b[0m\r\n", 509 | "\u001b[0;32m \"links\": {\u001b[0m\r\n", 510 | "\u001b[0;32m \"ids\": [],\u001b[0m\r\n", 511 | "\u001b[0;32m \"labels\": [],\u001b[0m\r\n", 512 | "\u001b[0;32m \"masters\": [],\u001b[0m\r\n", 513 | "\u001b[0;32m \"uuids\": []\u001b[0m\r\n", 514 | "\u001b[0;32m },\u001b[0m\r\n", 515 | "\u001b[0;32m \"model\": null,\u001b[0m\r\n", 516 | "\u001b[0;32m \"partitions\": {},\u001b[0m\r\n", 517 | "\u001b[0;32m \"removable\": \"0\",\u001b[0m\r\n", 518 | "\u001b[0;32m \"rotational\": \"1\",\u001b[0m\r\n", 519 | "\u001b[0;32m \"sas_address\": null,\u001b[0m\r\n", 520 | "\u001b[0;32m \"sas_device_handle\": null,\u001b[0m\r\n", 521 | "\u001b[0;32m \"scheduler_mode\": \"\",\u001b[0m\r\n", 522 | "\u001b[0;32m \"sectors\": \"0\",\u001b[0m\r\n", 523 | "\u001b[0;32m \"sectorsize\": \"512\",\u001b[0m\r\n", 524 | "\u001b[0;32m \"size\": \"0.00 Bytes\",\u001b[0m\r\n", 525 | "\u001b[0;32m \"support_discard\": \"0\",\u001b[0m\r\n", 526 | "\u001b[0;32m \"vendor\": null,\u001b[0m\r\n", 527 | "\u001b[0;32m \"virtual\": 1\u001b[0m\r\n", 528 | "\u001b[0;32m },\u001b[0m\r\n", 529 | "\u001b[0;32m \"nbd0\": {\u001b[0m\r\n", 530 | "\u001b[0;32m \"holders\": [],\u001b[0m\r\n", 531 | "\u001b[0;32m \"host\": \"\",\u001b[0m\r\n", 532 | "\u001b[0;32m \"links\": {\u001b[0m\r\n", 533 | "\u001b[0;32m \"ids\": [],\u001b[0m\r\n", 534 | "\u001b[0;32m \"labels\": [],\u001b[0m\r\n", 535 | "\u001b[0;32m \"masters\": [],\u001b[0m\r\n", 536 | "\u001b[0;32m \"uuids\": []\u001b[0m\r\n", 537 | "\u001b[0;32m },\u001b[0m\r\n", 538 | "\u001b[0;32m \"model\": null,\u001b[0m\r\n", 539 | "\u001b[0;32m \"partitions\": {},\u001b[0m\r\n", 540 | "\u001b[0;32m \"removable\": \"0\",\u001b[0m\r\n", 541 | "\u001b[0;32m \"rotational\": \"0\",\u001b[0m\r\n", 542 | "\u001b[0;32m \"sas_address\": null,\u001b[0m\r\n", 543 | "\u001b[0;32m \"sas_device_handle\": null,\u001b[0m\r\n", 544 | "\u001b[0;32m \"scheduler_mode\": \"\",\u001b[0m\r\n", 545 | "\u001b[0;32m \"sectors\": \"0\",\u001b[0m\r\n", 546 | "\u001b[0;32m \"sectorsize\": \"512\",\u001b[0m\r\n", 547 | "\u001b[0;32m \"size\": \"0.00 Bytes\",\u001b[0m\r\n", 548 | "\u001b[0;32m \"support_discard\": \"512\",\u001b[0m\r\n", 549 | "\u001b[0;32m \"vendor\": null,\u001b[0m\r\n", 550 | "\u001b[0;32m \"virtual\": 1\u001b[0m\r\n", 551 | "\u001b[0;32m },\u001b[0m\r\n", 552 | "\u001b[0;32m \"nbd1\": {\u001b[0m\r\n", 553 | "\u001b[0;32m \"holders\": [],\u001b[0m\r\n", 554 | "\u001b[0;32m \"host\": \"\",\u001b[0m\r\n", 555 | "\u001b[0;32m \"links\": {\u001b[0m\r\n", 556 | "\u001b[0;32m \"ids\": [],\u001b[0m\r\n", 557 | "\u001b[0;32m \"labels\": [],\u001b[0m\r\n", 558 | "\u001b[0;32m \"masters\": [],\u001b[0m\r\n", 559 | "\u001b[0;32m \"uuids\": []\u001b[0m\r\n", 560 | "\u001b[0;32m },\u001b[0m\r\n", 561 | "\u001b[0;32m \"model\": null,\u001b[0m\r\n", 562 | "\u001b[0;32m \"partitions\": {},\u001b[0m\r\n", 563 | "\u001b[0;32m \"removable\": \"0\",\u001b[0m\r\n", 564 | "\u001b[0;32m \"rotational\": \"0\",\u001b[0m\r\n", 565 | "\u001b[0;32m \"sas_address\": null,\u001b[0m\r\n", 566 | "\u001b[0;32m \"sas_device_handle\": null,\u001b[0m\r\n", 567 | "\u001b[0;32m \"scheduler_mode\": \"\",\u001b[0m\r\n", 568 | "\u001b[0;32m \"sectors\": \"0\",\u001b[0m\r\n", 569 | "\u001b[0;32m \"sectorsize\": \"512\",\u001b[0m\r\n", 570 | "\u001b[0;32m \"size\": \"0.00 Bytes\",\u001b[0m\r\n", 571 | "\u001b[0;32m \"support_discard\": \"512\",\u001b[0m\r\n", 572 | "\u001b[0;32m \"vendor\": null,\u001b[0m\r\n", 573 | "\u001b[0;32m \"virtual\": 1\u001b[0m\r\n", 574 | "\u001b[0;32m },\u001b[0m\r\n", 575 | "\u001b[0;32m \"nbd10\": {\u001b[0m\r\n", 576 | "\u001b[0;32m \"holders\": [],\u001b[0m\r\n", 577 | "\u001b[0;32m \"host\": \"\",\u001b[0m\r\n", 578 | "\u001b[0;32m \"links\": {\u001b[0m\r\n", 579 | "\u001b[0;32m \"ids\": [],\u001b[0m\r\n", 580 | "\u001b[0;32m \"labels\": [],\u001b[0m\r\n", 581 | "\u001b[0;32m \"masters\": [],\u001b[0m\r\n", 582 | "\u001b[0;32m \"uuids\": []\u001b[0m\r\n", 583 | "\u001b[0;32m },\u001b[0m\r\n", 584 | "\u001b[0;32m \"model\": null,\u001b[0m\r\n", 585 | "\u001b[0;32m \"partitions\": {},\u001b[0m\r\n", 586 | "\u001b[0;32m \"removable\": \"0\",\u001b[0m\r\n", 587 | "\u001b[0;32m \"rotational\": \"0\",\u001b[0m\r\n", 588 | "\u001b[0;32m \"sas_address\": null,\u001b[0m\r\n", 589 | "\u001b[0;32m \"sas_device_handle\": null,\u001b[0m\r\n", 590 | "\u001b[0;32m \"scheduler_mode\": \"\",\u001b[0m\r\n", 591 | "\u001b[0;32m \"sectors\": \"0\",\u001b[0m\r\n", 592 | "\u001b[0;32m \"sectorsize\": \"512\",\u001b[0m\r\n", 593 | "\u001b[0;32m \"size\": \"0.00 Bytes\",\u001b[0m\r\n", 594 | "\u001b[0;32m \"support_discard\": \"512\",\u001b[0m\r\n", 595 | "\u001b[0;32m \"vendor\": null,\u001b[0m\r\n", 596 | "\u001b[0;32m \"virtual\": 1\u001b[0m\r\n", 597 | "\u001b[0;32m },\u001b[0m\r\n", 598 | "\u001b[0;32m \"nbd11\": {\u001b[0m\r\n", 599 | "\u001b[0;32m \"holders\": [],\u001b[0m\r\n", 600 | "\u001b[0;32m \"host\": \"\",\u001b[0m\r\n", 601 | "\u001b[0;32m \"links\": {\u001b[0m\r\n", 602 | "\u001b[0;32m \"ids\": [],\u001b[0m\r\n", 603 | "\u001b[0;32m \"labels\": [],\u001b[0m\r\n", 604 | "\u001b[0;32m \"masters\": [],\u001b[0m\r\n", 605 | "\u001b[0;32m \"uuids\": []\u001b[0m\r\n", 606 | "\u001b[0;32m },\u001b[0m\r\n", 607 | "\u001b[0;32m \"model\": null,\u001b[0m\r\n", 608 | "\u001b[0;32m \"partitions\": {},\u001b[0m\r\n", 609 | "\u001b[0;32m \"removable\": \"0\",\u001b[0m\r\n", 610 | "\u001b[0;32m \"rotational\": \"0\",\u001b[0m\r\n", 611 | "\u001b[0;32m \"sas_address\": null,\u001b[0m\r\n", 612 | "\u001b[0;32m \"sas_device_handle\": null,\u001b[0m\r\n", 613 | "\u001b[0;32m \"scheduler_mode\": \"\",\u001b[0m\r\n", 614 | "\u001b[0;32m \"sectors\": \"0\",\u001b[0m\r\n", 615 | "\u001b[0;32m \"sectorsize\": \"512\",\u001b[0m\r\n", 616 | "\u001b[0;32m \"size\": \"0.00 Bytes\",\u001b[0m\r\n", 617 | "\u001b[0;32m \"support_discard\": \"512\",\u001b[0m\r\n", 618 | "\u001b[0;32m \"vendor\": null,\u001b[0m\r\n", 619 | "\u001b[0;32m \"virtual\": 1\u001b[0m\r\n", 620 | "\u001b[0;32m },\u001b[0m\r\n", 621 | "\u001b[0;32m \"nbd12\": {\u001b[0m\r\n", 622 | "\u001b[0;32m \"holders\": [],\u001b[0m\r\n", 623 | "\u001b[0;32m \"host\": \"\",\u001b[0m\r\n", 624 | "\u001b[0;32m \"links\": {\u001b[0m\r\n", 625 | "\u001b[0;32m \"ids\": [],\u001b[0m\r\n", 626 | "\u001b[0;32m \"labels\": [],\u001b[0m\r\n", 627 | "\u001b[0;32m \"masters\": [],\u001b[0m\r\n", 628 | "\u001b[0;32m \"uuids\": []\u001b[0m\r\n", 629 | "\u001b[0;32m },\u001b[0m\r\n", 630 | "\u001b[0;32m \"model\": null,\u001b[0m\r\n", 631 | "\u001b[0;32m \"partitions\": {},\u001b[0m\r\n", 632 | "\u001b[0;32m \"removable\": \"0\",\u001b[0m\r\n", 633 | "\u001b[0;32m \"rotational\": \"0\",\u001b[0m\r\n", 634 | "\u001b[0;32m \"sas_address\": null,\u001b[0m\r\n", 635 | "\u001b[0;32m \"sas_device_handle\": null,\u001b[0m\r\n", 636 | "\u001b[0;32m \"scheduler_mode\": \"\",\u001b[0m\r\n", 637 | "\u001b[0;32m \"sectors\": \"0\",\u001b[0m\r\n", 638 | "\u001b[0;32m \"sectorsize\": \"512\",\u001b[0m\r\n", 639 | "\u001b[0;32m \"size\": \"0.00 Bytes\",\u001b[0m\r\n", 640 | "\u001b[0;32m \"support_discard\": \"512\",\u001b[0m\r\n", 641 | "\u001b[0;32m \"vendor\": null,\u001b[0m\r\n", 642 | "\u001b[0;32m \"virtual\": 1\u001b[0m\r\n", 643 | "\u001b[0;32m },\u001b[0m\r\n", 644 | "\u001b[0;32m \"nbd13\": {\u001b[0m\r\n", 645 | "\u001b[0;32m \"holders\": [],\u001b[0m\r\n", 646 | "\u001b[0;32m \"host\": \"\",\u001b[0m\r\n", 647 | "\u001b[0;32m \"links\": {\u001b[0m\r\n", 648 | "\u001b[0;32m \"ids\": [],\u001b[0m\r\n", 649 | "\u001b[0;32m \"labels\": [],\u001b[0m\r\n", 650 | "\u001b[0;32m \"masters\": [],\u001b[0m\r\n", 651 | "\u001b[0;32m \"uuids\": []\u001b[0m\r\n", 652 | "\u001b[0;32m },\u001b[0m\r\n", 653 | "\u001b[0;32m \"model\": null,\u001b[0m\r\n", 654 | "\u001b[0;32m \"partitions\": {},\u001b[0m\r\n", 655 | "\u001b[0;32m \"removable\": \"0\",\u001b[0m\r\n", 656 | "\u001b[0;32m \"rotational\": \"0\",\u001b[0m\r\n", 657 | "\u001b[0;32m \"sas_address\": null,\u001b[0m\r\n", 658 | "\u001b[0;32m \"sas_device_handle\": null,\u001b[0m\r\n", 659 | "\u001b[0;32m \"scheduler_mode\": \"\",\u001b[0m\r\n", 660 | "\u001b[0;32m \"sectors\": \"0\",\u001b[0m\r\n", 661 | "\u001b[0;32m \"sectorsize\": \"512\",\u001b[0m\r\n", 662 | "\u001b[0;32m \"size\": \"0.00 Bytes\",\u001b[0m\r\n", 663 | "\u001b[0;32m \"support_discard\": \"512\",\u001b[0m\r\n", 664 | "\u001b[0;32m \"vendor\": null,\u001b[0m\r\n", 665 | "\u001b[0;32m \"virtual\": 1\u001b[0m\r\n", 666 | "\u001b[0;32m },\u001b[0m\r\n", 667 | "\u001b[0;32m \"nbd14\": {\u001b[0m\r\n", 668 | "\u001b[0;32m \"holders\": [],\u001b[0m\r\n", 669 | "\u001b[0;32m \"host\": \"\",\u001b[0m\r\n", 670 | "\u001b[0;32m \"links\": {\u001b[0m\r\n", 671 | "\u001b[0;32m \"ids\": [],\u001b[0m\r\n", 672 | "\u001b[0;32m \"labels\": [],\u001b[0m\r\n", 673 | "\u001b[0;32m \"masters\": [],\u001b[0m\r\n", 674 | "\u001b[0;32m \"uuids\": []\u001b[0m\r\n", 675 | "\u001b[0;32m },\u001b[0m\r\n", 676 | "\u001b[0;32m \"model\": null,\u001b[0m\r\n", 677 | "\u001b[0;32m \"partitions\": {},\u001b[0m\r\n", 678 | "\u001b[0;32m \"removable\": \"0\",\u001b[0m\r\n", 679 | "\u001b[0;32m \"rotational\": \"0\",\u001b[0m\r\n", 680 | "\u001b[0;32m \"sas_address\": null,\u001b[0m\r\n", 681 | "\u001b[0;32m \"sas_device_handle\": null,\u001b[0m\r\n", 682 | "\u001b[0;32m \"scheduler_mode\": \"\",\u001b[0m\r\n", 683 | "\u001b[0;32m \"sectors\": \"0\",\u001b[0m\r\n", 684 | "\u001b[0;32m \"sectorsize\": \"512\",\u001b[0m\r\n", 685 | "\u001b[0;32m \"size\": \"0.00 Bytes\",\u001b[0m\r\n", 686 | "\u001b[0;32m \"support_discard\": \"512\",\u001b[0m\r\n", 687 | "\u001b[0;32m \"vendor\": null,\u001b[0m\r\n", 688 | "\u001b[0;32m \"virtual\": 1\u001b[0m\r\n", 689 | "\u001b[0;32m },\u001b[0m\r\n", 690 | "\u001b[0;32m \"nbd15\": {\u001b[0m\r\n", 691 | "\u001b[0;32m \"holders\": [],\u001b[0m\r\n", 692 | "\u001b[0;32m \"host\": \"\",\u001b[0m\r\n", 693 | "\u001b[0;32m \"links\": {\u001b[0m\r\n", 694 | "\u001b[0;32m \"ids\": [],\u001b[0m\r\n", 695 | "\u001b[0;32m \"labels\": [],\u001b[0m\r\n", 696 | "\u001b[0;32m \"masters\": [],\u001b[0m\r\n", 697 | "\u001b[0;32m \"uuids\": []\u001b[0m\r\n", 698 | "\u001b[0;32m },\u001b[0m\r\n", 699 | "\u001b[0;32m \"model\": null,\u001b[0m\r\n", 700 | "\u001b[0;32m \"partitions\": {},\u001b[0m\r\n", 701 | "\u001b[0;32m \"removable\": \"0\",\u001b[0m\r\n", 702 | "\u001b[0;32m \"rotational\": \"0\",\u001b[0m\r\n", 703 | "\u001b[0;32m \"sas_address\": null,\u001b[0m\r\n", 704 | "\u001b[0;32m \"sas_device_handle\": null,\u001b[0m\r\n", 705 | "\u001b[0;32m \"scheduler_mode\": \"\",\u001b[0m\r\n", 706 | "\u001b[0;32m \"sectors\": \"0\",\u001b[0m\r\n", 707 | "\u001b[0;32m \"sectorsize\": \"512\",\u001b[0m\r\n", 708 | "\u001b[0;32m \"size\": \"0.00 Bytes\",\u001b[0m\r\n", 709 | "\u001b[0;32m \"support_discard\": \"512\",\u001b[0m\r\n", 710 | "\u001b[0;32m \"vendor\": null,\u001b[0m\r\n", 711 | "\u001b[0;32m \"virtual\": 1\u001b[0m\r\n", 712 | "\u001b[0;32m },\u001b[0m\r\n", 713 | "\u001b[0;32m \"nbd2\": {\u001b[0m\r\n", 714 | "\u001b[0;32m \"holders\": [],\u001b[0m\r\n", 715 | "\u001b[0;32m \"host\": \"\",\u001b[0m\r\n", 716 | "\u001b[0;32m \"links\": {\u001b[0m\r\n", 717 | "\u001b[0;32m \"ids\": [],\u001b[0m\r\n", 718 | "\u001b[0;32m \"labels\": [],\u001b[0m\r\n", 719 | "\u001b[0;32m \"masters\": [],\u001b[0m\r\n", 720 | "\u001b[0;32m \"uuids\": []\u001b[0m\r\n", 721 | "\u001b[0;32m },\u001b[0m\r\n", 722 | "\u001b[0;32m \"model\": null,\u001b[0m\r\n", 723 | "\u001b[0;32m \"partitions\": {},\u001b[0m\r\n", 724 | "\u001b[0;32m \"removable\": \"0\",\u001b[0m\r\n", 725 | "\u001b[0;32m \"rotational\": \"0\",\u001b[0m\r\n", 726 | "\u001b[0;32m \"sas_address\": null,\u001b[0m\r\n", 727 | "\u001b[0;32m \"sas_device_handle\": null,\u001b[0m\r\n", 728 | "\u001b[0;32m \"scheduler_mode\": \"\",\u001b[0m\r\n", 729 | "\u001b[0;32m \"sectors\": \"0\",\u001b[0m\r\n", 730 | "\u001b[0;32m \"sectorsize\": \"512\",\u001b[0m\r\n", 731 | "\u001b[0;32m \"size\": \"0.00 Bytes\",\u001b[0m\r\n", 732 | "\u001b[0;32m \"support_discard\": \"512\",\u001b[0m\r\n", 733 | "\u001b[0;32m \"vendor\": null,\u001b[0m\r\n", 734 | "\u001b[0;32m \"virtual\": 1\u001b[0m\r\n", 735 | "\u001b[0;32m },\u001b[0m\r\n", 736 | "\u001b[0;32m \"nbd3\": {\u001b[0m\r\n", 737 | "\u001b[0;32m \"holders\": [],\u001b[0m\r\n", 738 | "\u001b[0;32m \"host\": \"\",\u001b[0m\r\n", 739 | "\u001b[0;32m \"links\": {\u001b[0m\r\n", 740 | "\u001b[0;32m \"ids\": [],\u001b[0m\r\n", 741 | "\u001b[0;32m \"labels\": [],\u001b[0m\r\n", 742 | "\u001b[0;32m \"masters\": [],\u001b[0m\r\n", 743 | "\u001b[0;32m \"uuids\": []\u001b[0m\r\n", 744 | "\u001b[0;32m },\u001b[0m\r\n", 745 | "\u001b[0;32m \"model\": null,\u001b[0m\r\n", 746 | "\u001b[0;32m \"partitions\": {},\u001b[0m\r\n", 747 | "\u001b[0;32m \"removable\": \"0\",\u001b[0m\r\n", 748 | "\u001b[0;32m \"rotational\": \"0\",\u001b[0m\r\n", 749 | "\u001b[0;32m \"sas_address\": null,\u001b[0m\r\n", 750 | "\u001b[0;32m \"sas_device_handle\": null,\u001b[0m\r\n", 751 | "\u001b[0;32m \"scheduler_mode\": \"\",\u001b[0m\r\n", 752 | "\u001b[0;32m \"sectors\": \"0\",\u001b[0m\r\n", 753 | "\u001b[0;32m \"sectorsize\": \"512\",\u001b[0m\r\n", 754 | "\u001b[0;32m \"size\": \"0.00 Bytes\",\u001b[0m\r\n", 755 | "\u001b[0;32m \"support_discard\": \"512\",\u001b[0m\r\n", 756 | "\u001b[0;32m \"vendor\": null,\u001b[0m\r\n", 757 | "\u001b[0;32m \"virtual\": 1\u001b[0m\r\n", 758 | "\u001b[0;32m },\u001b[0m\r\n", 759 | "\u001b[0;32m \"nbd4\": {\u001b[0m\r\n", 760 | "\u001b[0;32m \"holders\": [],\u001b[0m\r\n", 761 | "\u001b[0;32m \"host\": \"\",\u001b[0m\r\n", 762 | "\u001b[0;32m \"links\": {\u001b[0m\r\n", 763 | "\u001b[0;32m \"ids\": [],\u001b[0m\r\n", 764 | "\u001b[0;32m \"labels\": [],\u001b[0m\r\n", 765 | "\u001b[0;32m \"masters\": [],\u001b[0m\r\n", 766 | "\u001b[0;32m \"uuids\": []\u001b[0m\r\n", 767 | "\u001b[0;32m },\u001b[0m\r\n", 768 | "\u001b[0;32m \"model\": null,\u001b[0m\r\n", 769 | "\u001b[0;32m \"partitions\": {},\u001b[0m\r\n", 770 | "\u001b[0;32m \"removable\": \"0\",\u001b[0m\r\n", 771 | "\u001b[0;32m \"rotational\": \"0\",\u001b[0m\r\n", 772 | "\u001b[0;32m \"sas_address\": null,\u001b[0m\r\n", 773 | "\u001b[0;32m \"sas_device_handle\": null,\u001b[0m\r\n", 774 | "\u001b[0;32m \"scheduler_mode\": \"\",\u001b[0m\r\n", 775 | "\u001b[0;32m \"sectors\": \"0\",\u001b[0m\r\n", 776 | "\u001b[0;32m \"sectorsize\": \"512\",\u001b[0m\r\n", 777 | "\u001b[0;32m \"size\": \"0.00 Bytes\",\u001b[0m\r\n", 778 | "\u001b[0;32m \"support_discard\": \"512\",\u001b[0m\r\n", 779 | "\u001b[0;32m \"vendor\": null,\u001b[0m\r\n", 780 | "\u001b[0;32m \"virtual\": 1\u001b[0m\r\n", 781 | "\u001b[0;32m },\u001b[0m\r\n", 782 | "\u001b[0;32m \"nbd5\": {\u001b[0m\r\n", 783 | "\u001b[0;32m \"holders\": [],\u001b[0m\r\n", 784 | "\u001b[0;32m \"host\": \"\",\u001b[0m\r\n", 785 | "\u001b[0;32m \"links\": {\u001b[0m\r\n", 786 | "\u001b[0;32m \"ids\": [],\u001b[0m\r\n", 787 | "\u001b[0;32m \"labels\": [],\u001b[0m\r\n", 788 | "\u001b[0;32m \"masters\": [],\u001b[0m\r\n", 789 | "\u001b[0;32m \"uuids\": []\u001b[0m\r\n", 790 | "\u001b[0;32m },\u001b[0m\r\n", 791 | "\u001b[0;32m \"model\": null,\u001b[0m\r\n", 792 | "\u001b[0;32m \"partitions\": {},\u001b[0m\r\n", 793 | "\u001b[0;32m \"removable\": \"0\",\u001b[0m\r\n", 794 | "\u001b[0;32m \"rotational\": \"0\",\u001b[0m\r\n", 795 | "\u001b[0;32m \"sas_address\": null,\u001b[0m\r\n", 796 | "\u001b[0;32m \"sas_device_handle\": null,\u001b[0m\r\n", 797 | "\u001b[0;32m \"scheduler_mode\": \"\",\u001b[0m\r\n", 798 | "\u001b[0;32m \"sectors\": \"0\",\u001b[0m\r\n", 799 | "\u001b[0;32m \"sectorsize\": \"512\",\u001b[0m\r\n", 800 | "\u001b[0;32m \"size\": \"0.00 Bytes\",\u001b[0m\r\n", 801 | "\u001b[0;32m \"support_discard\": \"512\",\u001b[0m\r\n", 802 | "\u001b[0;32m \"vendor\": null,\u001b[0m\r\n", 803 | "\u001b[0;32m \"virtual\": 1\u001b[0m\r\n", 804 | "\u001b[0;32m },\u001b[0m\r\n", 805 | "\u001b[0;32m \"nbd6\": {\u001b[0m\r\n", 806 | "\u001b[0;32m \"holders\": [],\u001b[0m\r\n", 807 | "\u001b[0;32m \"host\": \"\",\u001b[0m\r\n", 808 | "\u001b[0;32m \"links\": {\u001b[0m\r\n", 809 | "\u001b[0;32m \"ids\": [],\u001b[0m\r\n", 810 | "\u001b[0;32m \"labels\": [],\u001b[0m\r\n", 811 | "\u001b[0;32m \"masters\": [],\u001b[0m\r\n", 812 | "\u001b[0;32m \"uuids\": []\u001b[0m\r\n", 813 | "\u001b[0;32m },\u001b[0m\r\n", 814 | "\u001b[0;32m \"model\": null,\u001b[0m\r\n", 815 | "\u001b[0;32m \"partitions\": {},\u001b[0m\r\n", 816 | "\u001b[0;32m \"removable\": \"0\",\u001b[0m\r\n", 817 | "\u001b[0;32m \"rotational\": \"0\",\u001b[0m\r\n", 818 | "\u001b[0;32m \"sas_address\": null,\u001b[0m\r\n", 819 | "\u001b[0;32m \"sas_device_handle\": null,\u001b[0m\r\n", 820 | "\u001b[0;32m \"scheduler_mode\": \"\",\u001b[0m\r\n", 821 | "\u001b[0;32m \"sectors\": \"0\",\u001b[0m\r\n", 822 | "\u001b[0;32m \"sectorsize\": \"512\",\u001b[0m\r\n", 823 | "\u001b[0;32m \"size\": \"0.00 Bytes\",\u001b[0m\r\n", 824 | "\u001b[0;32m \"support_discard\": \"512\",\u001b[0m\r\n", 825 | "\u001b[0;32m \"vendor\": null,\u001b[0m\r\n", 826 | "\u001b[0;32m \"virtual\": 1\u001b[0m\r\n", 827 | "\u001b[0;32m },\u001b[0m\r\n", 828 | "\u001b[0;32m \"nbd7\": {\u001b[0m\r\n", 829 | "\u001b[0;32m \"holders\": [],\u001b[0m\r\n", 830 | "\u001b[0;32m \"host\": \"\",\u001b[0m\r\n", 831 | "\u001b[0;32m \"links\": {\u001b[0m\r\n", 832 | "\u001b[0;32m \"ids\": [],\u001b[0m\r\n", 833 | "\u001b[0;32m \"labels\": [],\u001b[0m\r\n", 834 | "\u001b[0;32m \"masters\": [],\u001b[0m\r\n", 835 | "\u001b[0;32m \"uuids\": []\u001b[0m\r\n", 836 | "\u001b[0;32m },\u001b[0m\r\n", 837 | "\u001b[0;32m \"model\": null,\u001b[0m\r\n", 838 | "\u001b[0;32m \"partitions\": {},\u001b[0m\r\n", 839 | "\u001b[0;32m \"removable\": \"0\",\u001b[0m\r\n", 840 | "\u001b[0;32m \"rotational\": \"0\",\u001b[0m\r\n", 841 | "\u001b[0;32m \"sas_address\": null,\u001b[0m\r\n", 842 | "\u001b[0;32m \"sas_device_handle\": null,\u001b[0m\r\n", 843 | "\u001b[0;32m \"scheduler_mode\": \"\",\u001b[0m\r\n", 844 | "\u001b[0;32m \"sectors\": \"0\",\u001b[0m\r\n", 845 | "\u001b[0;32m \"sectorsize\": \"512\",\u001b[0m\r\n", 846 | "\u001b[0;32m \"size\": \"0.00 Bytes\",\u001b[0m\r\n", 847 | "\u001b[0;32m \"support_discard\": \"512\",\u001b[0m\r\n", 848 | "\u001b[0;32m \"vendor\": null,\u001b[0m\r\n", 849 | "\u001b[0;32m \"virtual\": 1\u001b[0m\r\n", 850 | "\u001b[0;32m },\u001b[0m\r\n", 851 | "\u001b[0;32m \"nbd8\": {\u001b[0m\r\n", 852 | "\u001b[0;32m \"holders\": [],\u001b[0m\r\n", 853 | "\u001b[0;32m \"host\": \"\",\u001b[0m\r\n", 854 | "\u001b[0;32m \"links\": {\u001b[0m\r\n", 855 | "\u001b[0;32m \"ids\": [],\u001b[0m\r\n", 856 | "\u001b[0;32m \"labels\": [],\u001b[0m\r\n", 857 | "\u001b[0;32m \"masters\": [],\u001b[0m\r\n", 858 | "\u001b[0;32m \"uuids\": []\u001b[0m\r\n", 859 | "\u001b[0;32m },\u001b[0m\r\n", 860 | "\u001b[0;32m \"model\": null,\u001b[0m\r\n", 861 | "\u001b[0;32m \"partitions\": {},\u001b[0m\r\n", 862 | "\u001b[0;32m \"removable\": \"0\",\u001b[0m\r\n", 863 | "\u001b[0;32m \"rotational\": \"0\",\u001b[0m\r\n", 864 | "\u001b[0;32m \"sas_address\": null,\u001b[0m\r\n", 865 | "\u001b[0;32m \"sas_device_handle\": null,\u001b[0m\r\n", 866 | "\u001b[0;32m \"scheduler_mode\": \"\",\u001b[0m\r\n", 867 | "\u001b[0;32m \"sectors\": \"0\",\u001b[0m\r\n", 868 | "\u001b[0;32m \"sectorsize\": \"512\",\u001b[0m\r\n", 869 | "\u001b[0;32m \"size\": \"0.00 Bytes\",\u001b[0m\r\n", 870 | "\u001b[0;32m \"support_discard\": \"512\",\u001b[0m\r\n", 871 | "\u001b[0;32m \"vendor\": null,\u001b[0m\r\n", 872 | "\u001b[0;32m \"virtual\": 1\u001b[0m\r\n", 873 | "\u001b[0;32m },\u001b[0m\r\n", 874 | "\u001b[0;32m \"nbd9\": {\u001b[0m\r\n", 875 | "\u001b[0;32m \"holders\": [],\u001b[0m\r\n", 876 | "\u001b[0;32m \"host\": \"\",\u001b[0m\r\n", 877 | "\u001b[0;32m \"links\": {\u001b[0m\r\n", 878 | "\u001b[0;32m \"ids\": [],\u001b[0m\r\n", 879 | "\u001b[0;32m \"labels\": [],\u001b[0m\r\n", 880 | "\u001b[0;32m \"masters\": [],\u001b[0m\r\n", 881 | "\u001b[0;32m \"uuids\": []\u001b[0m\r\n", 882 | "\u001b[0;32m },\u001b[0m\r\n", 883 | "\u001b[0;32m \"model\": null,\u001b[0m\r\n", 884 | "\u001b[0;32m \"partitions\": {},\u001b[0m\r\n", 885 | "\u001b[0;32m \"removable\": \"0\",\u001b[0m\r\n", 886 | "\u001b[0;32m \"rotational\": \"0\",\u001b[0m\r\n", 887 | "\u001b[0;32m \"sas_address\": null,\u001b[0m\r\n", 888 | "\u001b[0;32m \"sas_device_handle\": null,\u001b[0m\r\n", 889 | "\u001b[0;32m \"scheduler_mode\": \"\",\u001b[0m\r\n", 890 | "\u001b[0;32m \"sectors\": \"0\",\u001b[0m\r\n", 891 | "\u001b[0;32m \"sectorsize\": \"512\",\u001b[0m\r\n", 892 | "\u001b[0;32m \"size\": \"0.00 Bytes\",\u001b[0m\r\n", 893 | "\u001b[0;32m \"support_discard\": \"512\",\u001b[0m\r\n", 894 | "\u001b[0;32m \"vendor\": null,\u001b[0m\r\n", 895 | "\u001b[0;32m \"virtual\": 1\u001b[0m\r\n", 896 | "\u001b[0;32m },\u001b[0m\r\n", 897 | "\u001b[0;32m \"sda\": {\u001b[0m\r\n", 898 | "\u001b[0;32m \"holders\": [],\u001b[0m\r\n", 899 | "\u001b[0;32m \"host\": \"\",\u001b[0m\r\n", 900 | "\u001b[0;32m \"links\": {\u001b[0m\r\n", 901 | "\u001b[0;32m \"ids\": [],\u001b[0m\r\n", 902 | "\u001b[0;32m \"labels\": [],\u001b[0m\r\n", 903 | "\u001b[0;32m \"masters\": [],\u001b[0m\r\n", 904 | "\u001b[0;32m \"uuids\": []\u001b[0m\r\n", 905 | "\u001b[0;32m },\u001b[0m\r\n", 906 | "\u001b[0;32m \"model\": \"BHYVE SATA DISK\",\u001b[0m\r\n", 907 | "\u001b[0;32m \"partitions\": {\u001b[0m\r\n", 908 | "\u001b[0;32m \"sda1\": {\u001b[0m\r\n", 909 | "\u001b[0;32m \"holders\": [],\u001b[0m\r\n", 910 | "\u001b[0;32m \"links\": {\u001b[0m\r\n", 911 | "\u001b[0;32m \"ids\": [],\u001b[0m\r\n", 912 | "\u001b[0;32m \"labels\": [],\u001b[0m\r\n", 913 | "\u001b[0;32m \"masters\": [],\u001b[0m\r\n", 914 | "\u001b[0;32m \"uuids\": []\u001b[0m\r\n", 915 | "\u001b[0;32m },\u001b[0m\r\n", 916 | "\u001b[0;32m \"sectors\": \"134215680\",\u001b[0m\r\n", 917 | "\u001b[0;32m \"sectorsize\": 512,\u001b[0m\r\n", 918 | "\u001b[0;32m \"size\": \"64.00 GB\",\u001b[0m\r\n", 919 | "\u001b[0;32m \"start\": \"2048\",\u001b[0m\r\n", 920 | "\u001b[0;32m \"uuid\": null\u001b[0m\r\n", 921 | "\u001b[0;32m }\u001b[0m\r\n", 922 | "\u001b[0;32m },\u001b[0m\r\n", 923 | "\u001b[0;32m \"removable\": \"0\",\u001b[0m\r\n", 924 | "\u001b[0;32m \"rotational\": \"1\",\u001b[0m\r\n", 925 | "\u001b[0;32m \"sas_address\": null,\u001b[0m\r\n", 926 | "\u001b[0;32m \"sas_device_handle\": null,\u001b[0m\r\n", 927 | "\u001b[0;32m \"scheduler_mode\": \"deadline\",\u001b[0m\r\n", 928 | "\u001b[0;32m \"sectors\": \"134217728\",\u001b[0m\r\n", 929 | "\u001b[0;32m \"sectorsize\": \"512\",\u001b[0m\r\n", 930 | "\u001b[0;32m \"size\": \"64.00 GB\",\u001b[0m\r\n", 931 | "\u001b[0;32m \"support_discard\": \"512\",\u001b[0m\r\n", 932 | "\u001b[0;32m \"vendor\": \"ATA\",\u001b[0m\r\n", 933 | "\u001b[0;32m \"virtual\": 1\u001b[0m\r\n", 934 | "\u001b[0;32m },\u001b[0m\r\n", 935 | "\u001b[0;32m \"sr0\": {\u001b[0m\r\n", 936 | "\u001b[0;32m \"holders\": [],\u001b[0m\r\n", 937 | "\u001b[0;32m \"host\": \"\",\u001b[0m\r\n", 938 | "\u001b[0;32m \"links\": {\u001b[0m\r\n", 939 | "\u001b[0;32m \"ids\": [],\u001b[0m\r\n", 940 | "\u001b[0;32m \"labels\": [],\u001b[0m\r\n", 941 | "\u001b[0;32m \"masters\": [],\u001b[0m\r\n", 942 | "\u001b[0;32m \"uuids\": []\u001b[0m\r\n", 943 | "\u001b[0;32m },\u001b[0m\r\n", 944 | "\u001b[0;32m \"model\": \"BHYVE DVD-ROM\",\u001b[0m\r\n", 945 | "\u001b[0;32m \"partitions\": {},\u001b[0m\r\n", 946 | "\u001b[0;32m \"removable\": \"1\",\u001b[0m\r\n", 947 | "\u001b[0;32m \"rotational\": \"1\",\u001b[0m\r\n", 948 | "\u001b[0;32m \"sas_address\": null,\u001b[0m\r\n", 949 | "\u001b[0;32m \"sas_device_handle\": null,\u001b[0m\r\n", 950 | "\u001b[0;32m \"scheduler_mode\": \"deadline\",\u001b[0m\r\n", 951 | "\u001b[0;32m \"sectors\": \"1922412\",\u001b[0m\r\n", 952 | "\u001b[0;32m \"sectorsize\": \"2048\",\u001b[0m\r\n", 953 | "\u001b[0;32m \"size\": \"938.68 MB\",\u001b[0m\r\n", 954 | "\u001b[0;32m \"support_discard\": \"0\",\u001b[0m\r\n", 955 | "\u001b[0;32m \"vendor\": \"BHYVE\",\u001b[0m\r\n", 956 | "\u001b[0;32m \"virtual\": 1\u001b[0m\r\n", 957 | "\u001b[0;32m },\u001b[0m\r\n", 958 | "\u001b[0;32m \"sr1\": {\u001b[0m\r\n", 959 | "\u001b[0;32m \"holders\": [],\u001b[0m\r\n", 960 | "\u001b[0;32m \"host\": \"\",\u001b[0m\r\n", 961 | "\u001b[0;32m \"links\": {\u001b[0m\r\n", 962 | "\u001b[0;32m \"ids\": [],\u001b[0m\r\n", 963 | "\u001b[0;32m \"labels\": [],\u001b[0m\r\n", 964 | "\u001b[0;32m \"masters\": [],\u001b[0m\r\n", 965 | "\u001b[0;32m \"uuids\": []\u001b[0m\r\n", 966 | "\u001b[0;32m },\u001b[0m\r\n", 967 | "\u001b[0;32m \"model\": \"BHYVE DVD-ROM\",\u001b[0m\r\n", 968 | "\u001b[0;32m \"partitions\": {},\u001b[0m\r\n", 969 | "\u001b[0;32m \"removable\": \"1\",\u001b[0m\r\n", 970 | "\u001b[0;32m \"rotational\": \"1\",\u001b[0m\r\n", 971 | "\u001b[0;32m \"sas_address\": null,\u001b[0m\r\n", 972 | "\u001b[0;32m \"sas_device_handle\": null,\u001b[0m\r\n", 973 | "\u001b[0;32m \"scheduler_mode\": \"deadline\",\u001b[0m\r\n", 974 | "\u001b[0;32m \"sectors\": \"112\",\u001b[0m\r\n", 975 | "\u001b[0;32m \"sectorsize\": \"2048\",\u001b[0m\r\n", 976 | "\u001b[0;32m \"size\": \"56.00 KB\",\u001b[0m\r\n", 977 | "\u001b[0;32m \"support_discard\": \"0\",\u001b[0m\r\n", 978 | "\u001b[0;32m \"vendor\": \"BHYVE\",\u001b[0m\r\n", 979 | "\u001b[0;32m \"virtual\": 1\u001b[0m\r\n", 980 | "\u001b[0;32m }\u001b[0m\r\n", 981 | "\u001b[0;32m },\u001b[0m\r\n", 982 | "\u001b[0;32m \"ansible_distribution\": \"Archlinux\",\u001b[0m\r\n", 983 | "\u001b[0;32m \"ansible_distribution_file_path\": \"/etc/arch-release\",\u001b[0m\r\n", 984 | "\u001b[0;32m \"ansible_distribution_file_variety\": \"Archlinux\",\u001b[0m\r\n", 985 | "\u001b[0;32m \"ansible_distribution_major_version\": \"NA\",\u001b[0m\r\n", 986 | "\u001b[0;32m \"ansible_distribution_release\": \"NA\",\u001b[0m\r\n", 987 | "\u001b[0;32m \"ansible_distribution_version\": \"NA\",\u001b[0m\r\n", 988 | "\u001b[0;32m \"ansible_dns\": {\u001b[0m\r\n", 989 | "\u001b[0;32m \"nameservers\": [\u001b[0m\r\n", 990 | "\u001b[0;32m \"192.168.65.1\"\u001b[0m\r\n", 991 | "\u001b[0;32m ]\u001b[0m\r\n", 992 | "\u001b[0;32m },\u001b[0m\r\n", 993 | "\u001b[0;32m \"ansible_domain\": \"\",\u001b[0m\r\n", 994 | "\u001b[0;32m \"ansible_effective_group_id\": 0,\u001b[0m\r\n", 995 | "\u001b[0;32m \"ansible_effective_user_id\": 0,\u001b[0m\r\n", 996 | "\u001b[0;32m \"ansible_env\": {\u001b[0m\r\n", 997 | "\u001b[0;32m \"CLICOLOR\": \"1\",\u001b[0m\r\n", 998 | "\u001b[0;32m \"GIT_PAGER\": \"cat\",\u001b[0m\r\n", 999 | "\u001b[0;32m \"HOME\": \"/root\",\u001b[0m\r\n", 1000 | "\u001b[0;32m \"HOSTNAME\": \"d10b32a0f68c\",\u001b[0m\r\n", 1001 | "\u001b[0;32m \"JPY_PARENT_PID\": \"6\",\u001b[0m\r\n", 1002 | "\u001b[0;32m \"MPLBACKEND\": \"module://ipykernel.pylab.backend_inline\",\u001b[0m\r\n", 1003 | "\u001b[0;32m \"PAGER\": \"cat\",\u001b[0m\r\n", 1004 | "\u001b[0;32m \"PATH\": \"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\",\u001b[0m\r\n", 1005 | "\u001b[0;32m \"PWD\": \"/home\",\u001b[0m\r\n", 1006 | "\u001b[0;32m \"SHLVL\": \"4\",\u001b[0m\r\n", 1007 | "\u001b[0;32m \"TERM\": \"xterm-color\",\u001b[0m\r\n", 1008 | "\u001b[0;32m \"_\": \"/usr/bin/python\"\u001b[0m\r\n", 1009 | "\u001b[0;32m },\u001b[0m\r\n", 1010 | "\u001b[0;32m \"ansible_fips\": false,\u001b[0m\r\n", 1011 | "\u001b[0;32m \"ansible_form_factor\": \"Unknown\",\u001b[0m\r\n", 1012 | "\u001b[0;32m \"ansible_fqdn\": \"d10b32a0f68c\",\u001b[0m\r\n", 1013 | "\u001b[0;32m \"ansible_hostname\": \"d10b32a0f68c\",\u001b[0m\r\n", 1014 | "\u001b[0;32m \"ansible_is_chroot\": false,\u001b[0m\r\n", 1015 | "\u001b[0;32m \"ansible_kernel\": \"4.9.87-linuxkit-aufs\",\u001b[0m\r\n", 1016 | "\u001b[0;32m \"ansible_local\": {},\u001b[0m\r\n", 1017 | "\u001b[0;32m \"ansible_lsb\": {},\u001b[0m\r\n", 1018 | "\u001b[0;32m \"ansible_machine\": \"x86_64\",\u001b[0m\r\n", 1019 | "\u001b[0;32m \"ansible_machine_id\": \"d768c02b086b497089a1cf6bd2d8d8f3\",\u001b[0m\r\n", 1020 | "\u001b[0;32m \"ansible_memfree_mb\": 106,\u001b[0m\r\n", 1021 | "\u001b[0;32m \"ansible_memory_mb\": {\u001b[0m\r\n", 1022 | "\u001b[0;32m \"nocache\": {\u001b[0m\r\n", 1023 | "\u001b[0;32m \"free\": 675,\u001b[0m\r\n", 1024 | "\u001b[0;32m \"used\": 1323\u001b[0m\r\n", 1025 | "\u001b[0;32m },\u001b[0m\r\n", 1026 | "\u001b[0;32m \"real\": {\u001b[0m\r\n", 1027 | "\u001b[0;32m \"free\": 106,\u001b[0m\r\n", 1028 | "\u001b[0;32m \"total\": 1998,\u001b[0m\r\n", 1029 | "\u001b[0;32m \"used\": 1892\u001b[0m\r\n", 1030 | "\u001b[0;32m },\u001b[0m\r\n", 1031 | "\u001b[0;32m \"swap\": {\u001b[0m\r\n", 1032 | "\u001b[0;32m \"cached\": 0,\u001b[0m\r\n", 1033 | "\u001b[0;32m \"free\": 1008,\u001b[0m\r\n", 1034 | "\u001b[0;32m \"total\": 1023,\u001b[0m\r\n", 1035 | "\u001b[0;32m \"used\": 15\u001b[0m\r\n", 1036 | "\u001b[0;32m }\u001b[0m\r\n", 1037 | "\u001b[0;32m },\u001b[0m\r\n", 1038 | "\u001b[0;32m \"ansible_memtotal_mb\": 1998,\u001b[0m\r\n", 1039 | "\u001b[0;32m \"ansible_mounts\": [\u001b[0m\r\n", 1040 | "\u001b[0;32m {\u001b[0m\r\n", 1041 | "\u001b[0;32m \"block_available\": 9746078,\u001b[0m\r\n", 1042 | "\u001b[0;32m \"block_size\": 4096,\u001b[0m\r\n", 1043 | "\u001b[0;32m \"block_total\": 16448139,\u001b[0m\r\n", 1044 | "\u001b[0;32m \"block_used\": 6702061,\u001b[0m\r\n", 1045 | "\u001b[0;32m \"device\": \"/dev/sda1\",\u001b[0m\r\n", 1046 | "\u001b[0;32m \"fstype\": \"ext4\",\u001b[0m\r\n", 1047 | "\u001b[0;32m \"inode_available\": 3160877,\u001b[0m\r\n", 1048 | "\u001b[0;32m \"inode_total\": 4194304,\u001b[0m\r\n", 1049 | "\u001b[0;32m \"inode_used\": 1033427,\u001b[0m\r\n", 1050 | "\u001b[0;32m \"mount\": \"/etc/resolv.conf\",\u001b[0m\r\n", 1051 | "\u001b[0;32m \"options\": \"rw,relatime,data=ordered,bind\",\u001b[0m\r\n", 1052 | "\u001b[0;32m \"size_available\": 39919935488,\u001b[0m\r\n", 1053 | "\u001b[0;32m \"size_total\": 67371577344,\u001b[0m\r\n", 1054 | "\u001b[0;32m \"uuid\": \"N/A\"\u001b[0m\r\n", 1055 | "\u001b[0;32m },\u001b[0m\r\n", 1056 | "\u001b[0;32m {\u001b[0m\r\n", 1057 | "\u001b[0;32m \"block_available\": 9746078,\u001b[0m\r\n", 1058 | "\u001b[0;32m \"block_size\": 4096,\u001b[0m\r\n", 1059 | "\u001b[0;32m \"block_total\": 16448139,\u001b[0m\r\n", 1060 | "\u001b[0;32m \"block_used\": 6702061,\u001b[0m\r\n", 1061 | "\u001b[0;32m \"device\": \"/dev/sda1\",\u001b[0m\r\n", 1062 | "\u001b[0;32m \"fstype\": \"ext4\",\u001b[0m\r\n", 1063 | "\u001b[0;32m \"inode_available\": 3160877,\u001b[0m\r\n", 1064 | "\u001b[0;32m \"inode_total\": 4194304,\u001b[0m\r\n", 1065 | "\u001b[0;32m \"inode_used\": 1033427,\u001b[0m\r\n", 1066 | "\u001b[0;32m \"mount\": \"/etc/hostname\",\u001b[0m\r\n", 1067 | "\u001b[0;32m \"options\": \"rw,relatime,data=ordered,bind\",\u001b[0m\r\n", 1068 | "\u001b[0;32m \"size_available\": 39919935488,\u001b[0m\r\n", 1069 | "\u001b[0;32m \"size_total\": 67371577344,\u001b[0m\r\n", 1070 | "\u001b[0;32m \"uuid\": \"N/A\"\u001b[0m\r\n", 1071 | "\u001b[0;32m },\u001b[0m\r\n", 1072 | "\u001b[0;32m {\u001b[0m\r\n", 1073 | "\u001b[0;32m \"block_available\": 9746078,\u001b[0m\r\n", 1074 | "\u001b[0;32m \"block_size\": 4096,\u001b[0m\r\n", 1075 | "\u001b[0;32m \"block_total\": 16448139,\u001b[0m\r\n", 1076 | "\u001b[0;32m \"block_used\": 6702061,\u001b[0m\r\n", 1077 | "\u001b[0;32m \"device\": \"/dev/sda1\",\u001b[0m\r\n", 1078 | "\u001b[0;32m \"fstype\": \"ext4\",\u001b[0m\r\n", 1079 | "\u001b[0;32m \"inode_available\": 3160877,\u001b[0m\r\n", 1080 | "\u001b[0;32m \"inode_total\": 4194304,\u001b[0m\r\n", 1081 | "\u001b[0;32m \"inode_used\": 1033427,\u001b[0m\r\n", 1082 | "\u001b[0;32m \"mount\": \"/etc/hosts\",\u001b[0m\r\n", 1083 | "\u001b[0;32m \"options\": \"rw,relatime,data=ordered,bind\",\u001b[0m\r\n", 1084 | "\u001b[0;32m \"size_available\": 39919935488,\u001b[0m\r\n", 1085 | "\u001b[0;32m \"size_total\": 67371577344,\u001b[0m\r\n", 1086 | "\u001b[0;32m \"uuid\": \"N/A\"\u001b[0m\r\n", 1087 | "\u001b[0;32m }\u001b[0m\r\n", 1088 | "\u001b[0;32m ],\u001b[0m\r\n", 1089 | "\u001b[0;32m \"ansible_nodename\": \"d10b32a0f68c\",\u001b[0m\r\n", 1090 | "\u001b[0;32m \"ansible_os_family\": \"Archlinux\",\u001b[0m\r\n", 1091 | "\u001b[0;32m \"ansible_pkg_mgr\": \"pacman\",\u001b[0m\r\n", 1092 | "\u001b[0;32m \"ansible_processor\": [\u001b[0m\r\n", 1093 | "\u001b[0;32m \"0\",\u001b[0m\r\n", 1094 | "\u001b[0;32m \"GenuineIntel\",\u001b[0m\r\n", 1095 | "\u001b[0;32m \"Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz\",\u001b[0m\r\n", 1096 | "\u001b[0;32m \"1\",\u001b[0m\r\n", 1097 | "\u001b[0;32m \"GenuineIntel\",\u001b[0m\r\n", 1098 | "\u001b[0;32m \"Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz\"\u001b[0m\r\n", 1099 | "\u001b[0;32m ],\u001b[0m\r\n", 1100 | "\u001b[0;32m \"ansible_processor_cores\": 1,\u001b[0m\r\n", 1101 | "\u001b[0;32m \"ansible_processor_count\": 2,\u001b[0m\r\n", 1102 | "\u001b[0;32m \"ansible_processor_threads_per_core\": 1,\u001b[0m\r\n", 1103 | "\u001b[0;32m \"ansible_processor_vcpus\": 2,\u001b[0m\r\n", 1104 | "\u001b[0;32m \"ansible_product_name\": \"BHYVE\",\u001b[0m\r\n", 1105 | "\u001b[0;32m \"ansible_product_serial\": \"None\",\u001b[0m\r\n", 1106 | "\u001b[0;32m \"ansible_product_uuid\": \"003B4176-0000-0000-88D0-8E3AB99F1457\",\u001b[0m\r\n", 1107 | "\u001b[0;32m \"ansible_product_version\": \"1.0\",\u001b[0m\r\n", 1108 | "\u001b[0;32m \"ansible_python\": {\u001b[0m\r\n", 1109 | "\u001b[0;32m \"executable\": \"/usr/bin/python\",\u001b[0m\r\n", 1110 | "\u001b[0;32m \"has_sslcontext\": true,\u001b[0m\r\n", 1111 | "\u001b[0;32m \"type\": \"cpython\",\u001b[0m\r\n", 1112 | "\u001b[0;32m \"version\": {\u001b[0m\r\n", 1113 | "\u001b[0;32m \"major\": 3,\u001b[0m\r\n", 1114 | "\u001b[0;32m \"micro\": 5,\u001b[0m\r\n", 1115 | "\u001b[0;32m \"minor\": 6,\u001b[0m\r\n", 1116 | "\u001b[0;32m \"releaselevel\": \"final\",\u001b[0m\r\n", 1117 | "\u001b[0;32m \"serial\": 0\u001b[0m\r\n", 1118 | "\u001b[0;32m },\u001b[0m\r\n", 1119 | "\u001b[0;32m \"version_info\": [\u001b[0m\r\n", 1120 | "\u001b[0;32m 3,\u001b[0m\r\n", 1121 | "\u001b[0;32m 6,\u001b[0m\r\n", 1122 | "\u001b[0;32m 5,\u001b[0m\r\n", 1123 | "\u001b[0;32m \"final\",\u001b[0m\r\n", 1124 | "\u001b[0;32m 0\u001b[0m\r\n", 1125 | "\u001b[0;32m ]\u001b[0m\r\n", 1126 | "\u001b[0;32m },\u001b[0m\r\n", 1127 | "\u001b[0;32m \"ansible_python_version\": \"3.6.5\",\u001b[0m\r\n", 1128 | "\u001b[0;32m \"ansible_real_group_id\": 0,\u001b[0m\r\n", 1129 | "\u001b[0;32m \"ansible_real_user_id\": 0,\u001b[0m\r\n", 1130 | "\u001b[0;32m \"ansible_selinux\": {\u001b[0m\r\n", 1131 | "\u001b[0;32m \"status\": \"Missing selinux Python library\"\u001b[0m\r\n", 1132 | "\u001b[0;32m },\u001b[0m\r\n", 1133 | "\u001b[0;32m \"ansible_selinux_python_present\": false,\u001b[0m\r\n", 1134 | "\u001b[0;32m \"ansible_service_mgr\": \"docker-entrypoi\",\u001b[0m\r\n", 1135 | "\u001b[0;32m \"ansible_swapfree_mb\": 1008,\u001b[0m\r\n", 1136 | "\u001b[0;32m \"ansible_swaptotal_mb\": 1023,\u001b[0m\r\n", 1137 | "\u001b[0;32m \"ansible_system\": \"Linux\",\u001b[0m\r\n", 1138 | "\u001b[0;32m \"ansible_system_capabilities\": [\u001b[0m\r\n", 1139 | "\u001b[0;32m \"cap_chown\",\u001b[0m\r\n", 1140 | "\u001b[0;32m \"cap_dac_override\",\u001b[0m\r\n", 1141 | "\u001b[0;32m \"cap_fowner\",\u001b[0m\r\n", 1142 | "\u001b[0;32m \"cap_fsetid\",\u001b[0m\r\n", 1143 | "\u001b[0;32m \"cap_kill\",\u001b[0m\r\n", 1144 | "\u001b[0;32m \"cap_setgid\",\u001b[0m\r\n", 1145 | "\u001b[0;32m \"cap_setuid\",\u001b[0m\r\n", 1146 | "\u001b[0;32m \"cap_setpcap\",\u001b[0m\r\n", 1147 | "\u001b[0;32m \"cap_net_bind_service\",\u001b[0m\r\n", 1148 | "\u001b[0;32m \"cap_net_raw\",\u001b[0m\r\n", 1149 | "\u001b[0;32m \"cap_sys_chroot\",\u001b[0m\r\n", 1150 | "\u001b[0;32m \"cap_mknod\",\u001b[0m\r\n", 1151 | "\u001b[0;32m \"cap_audit_write\",\u001b[0m\r\n", 1152 | "\u001b[0;32m \"cap_setfcap+eip\"\u001b[0m\r\n", 1153 | "\u001b[0;32m ],\u001b[0m\r\n", 1154 | "\u001b[0;32m \"ansible_system_capabilities_enforced\": \"True\",\u001b[0m\r\n", 1155 | "\u001b[0;32m \"ansible_system_vendor\": \"NA\",\u001b[0m\r\n", 1156 | "\u001b[0;32m \"ansible_uptime_seconds\": 15792,\u001b[0m\r\n", 1157 | "\u001b[0;32m \"ansible_user_dir\": \"/root\",\u001b[0m\r\n", 1158 | "\u001b[0;32m \"ansible_user_gecos\": \"\",\u001b[0m\r\n", 1159 | "\u001b[0;32m \"ansible_user_gid\": 0,\u001b[0m\r\n", 1160 | "\u001b[0;32m \"ansible_user_id\": \"root\",\u001b[0m\r\n", 1161 | "\u001b[0;32m \"ansible_user_shell\": \"/bin/bash\",\u001b[0m\r\n", 1162 | "\u001b[0;32m \"ansible_user_uid\": 0,\u001b[0m\r\n", 1163 | "\u001b[0;32m \"ansible_userspace_architecture\": \"x86_64\",\u001b[0m\r\n", 1164 | "\u001b[0;32m \"ansible_userspace_bits\": \"64\",\u001b[0m\r\n", 1165 | "\u001b[0;32m \"ansible_virtualization_role\": \"guest\",\u001b[0m\r\n", 1166 | "\u001b[0;32m \"ansible_virtualization_type\": \"docker\",\u001b[0m\r\n", 1167 | "\u001b[0;32m \"gather_subset\": [\u001b[0m\r\n", 1168 | "\u001b[0;32m \"all\"\u001b[0m\r\n", 1169 | "\u001b[0;32m ],\u001b[0m\r\n", 1170 | "\u001b[0;32m \"module_setup\": true\u001b[0m\r\n", 1171 | "\u001b[0;32m },\u001b[0m\r\n", 1172 | "\u001b[0;32m \"changed\": false\u001b[0m\r\n", 1173 | "\u001b[0;32m}\u001b[0m\r\n" 1174 | ] 1175 | } 1176 | ], 1177 | "source": [ 1178 | "!ansible localhost -m setup" 1179 | ] 1180 | }, 1181 | { 1182 | "cell_type": "markdown", 1183 | "metadata": {}, 1184 | "source": [ 1185 | "Remove the **vim** with **pacman** package management on **Arch Linux**." 1186 | ] 1187 | }, 1188 | { 1189 | "cell_type": "code", 1190 | "execution_count": 12, 1191 | "metadata": {}, 1192 | "outputs": [ 1193 | { 1194 | "name": "stdout", 1195 | "output_type": "stream", 1196 | "text": [ 1197 | "\u001b[0;33mlocalhost | SUCCESS => {\u001b[0m\r\n", 1198 | "\u001b[0;33m \"changed\": true,\u001b[0m\r\n", 1199 | "\u001b[0;33m \"msg\": \"removed 1 package(s)\"\u001b[0m\r\n", 1200 | "\u001b[0;33m}\u001b[0m\r\n" 1201 | ] 1202 | } 1203 | ], 1204 | "source": [ 1205 | "!ansible localhost -m pacman -a 'name=vim state=absent'" 1206 | ] 1207 | }, 1208 | { 1209 | "cell_type": "markdown", 1210 | "metadata": {}, 1211 | "source": [ 1212 | "Install the **vim** with **pacman** package management on **Arch Linux**." 1213 | ] 1214 | }, 1215 | { 1216 | "cell_type": "code", 1217 | "execution_count": 13, 1218 | "metadata": { 1219 | "scrolled": true 1220 | }, 1221 | "outputs": [ 1222 | { 1223 | "name": "stdout", 1224 | "output_type": "stream", 1225 | "text": [ 1226 | "\u001b[0;33mlocalhost | SUCCESS => {\u001b[0m\r\n", 1227 | "\u001b[0;33m \"changed\": true,\u001b[0m\r\n", 1228 | "\u001b[0;33m \"msg\": \"installed 1 package(s). \"\u001b[0m\r\n", 1229 | "\u001b[0;33m}\u001b[0m\r\n" 1230 | ] 1231 | } 1232 | ], 1233 | "source": [ 1234 | "!ansible localhost -m pacman -a 'name=vim state=present'" 1235 | ] 1236 | }, 1237 | { 1238 | "cell_type": "markdown", 1239 | "metadata": {}, 1240 | "source": [ 1241 | "Install the **tree** with **pacman** package management on **Arch Linux**." 1242 | ] 1243 | }, 1244 | { 1245 | "cell_type": "code", 1246 | "execution_count": 14, 1247 | "metadata": { 1248 | "scrolled": true 1249 | }, 1250 | "outputs": [ 1251 | { 1252 | "name": "stdout", 1253 | "output_type": "stream", 1254 | "text": [ 1255 | "\u001b[0;33mlocalhost | SUCCESS => {\u001b[0m\r\n", 1256 | "\u001b[0;33m \"changed\": true,\u001b[0m\r\n", 1257 | "\u001b[0;33m \"msg\": \"installed 1 package(s). \"\u001b[0m\r\n", 1258 | "\u001b[0;33m}\u001b[0m\r\n" 1259 | ] 1260 | } 1261 | ], 1262 | "source": [ 1263 | "!ansible localhost -m pacman -a 'name=tree state=present'" 1264 | ] 1265 | }, 1266 | { 1267 | "cell_type": "code", 1268 | "execution_count": 15, 1269 | "metadata": {}, 1270 | "outputs": [ 1271 | { 1272 | "name": "stdout", 1273 | "output_type": "stream", 1274 | "text": [ 1275 | ".\r\n", 1276 | "|-- ansible.cfg\r\n", 1277 | "|-- ansible_on_jupyter.ipynb\r\n", 1278 | "|-- ansible_on_jupyter_archlinux.ipynb\r\n", 1279 | "|-- inventory\r\n", 1280 | "`-- setup_jupyter.yml\r\n", 1281 | "\r\n", 1282 | "0 directories, 5 files\r\n" 1283 | ] 1284 | } 1285 | ], 1286 | "source": [ 1287 | "!tree ." 1288 | ] 1289 | }, 1290 | { 1291 | "cell_type": "markdown", 1292 | "metadata": {}, 1293 | "source": [ 1294 | "## Playbooks\n", 1295 | "\n", 1296 | "Show `setup_jupyter.yml` playbook." 1297 | ] 1298 | }, 1299 | { 1300 | "cell_type": "code", 1301 | "execution_count": 16, 1302 | "metadata": {}, 1303 | "outputs": [ 1304 | { 1305 | "name": "stdout", 1306 | "output_type": "stream", 1307 | "text": [ 1308 | "---\r\n", 1309 | "\r\n", 1310 | "- name: \"Setup Ansible-Jupyter\"\r\n", 1311 | " hosts: localhost\r\n", 1312 | "\r\n", 1313 | " vars:\r\n", 1314 | "\r\n", 1315 | " # General package on GNU/Linux.\r\n", 1316 | " general_packages:\r\n", 1317 | " - bash\r\n", 1318 | " - bash-completion\r\n", 1319 | " - ca-certificates\r\n", 1320 | " - curl\r\n", 1321 | " - git\r\n", 1322 | " - openssl\r\n", 1323 | " - sshpass\r\n", 1324 | "\r\n", 1325 | " # Alpine Linux.\r\n", 1326 | " apk_packages:\r\n", 1327 | " - openssh-client\r\n", 1328 | " - vim\r\n", 1329 | "\r\n", 1330 | " # Debian, Ubuntu.\r\n", 1331 | " apt_packages: \"{{ apk_packages }}\"\r\n", 1332 | "\r\n", 1333 | " # Arch Linux.\r\n", 1334 | " pacman_packages:\r\n", 1335 | " - openssh\r\n", 1336 | " - vim\r\n", 1337 | "\r\n", 1338 | " # Gentoo Linux.\r\n", 1339 | " portage_packages:\r\n", 1340 | " - bash\r\n", 1341 | " - bash-completion\r\n", 1342 | " - ca-certificates\r\n", 1343 | " - dev-vcs/git\r\n", 1344 | " - net-misc/curl\r\n", 1345 | " - openssh\r\n", 1346 | " - openssl\r\n", 1347 | " - sqlite\r\n", 1348 | " - vim\r\n", 1349 | "\r\n", 1350 | " # CentOS.\r\n", 1351 | " yum_packages:\r\n", 1352 | " - openssh-clients\r\n", 1353 | " - vim-minimal\r\n", 1354 | "\r\n", 1355 | " # openSUSE.\r\n", 1356 | " zypper_packages: \"{{ pacman_packages }}\"\r\n", 1357 | "\r\n", 1358 | " # Python.\r\n", 1359 | " pip_packages:\r\n", 1360 | " - docker-py\r\n", 1361 | " - docker-compose\r\n", 1362 | "\r\n", 1363 | " jupyter_notebook_config_py_url: \"https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/files/jupyter_notebook_config.py\"\r\n", 1364 | " ssh_private_key_url: \"https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/files/ssh/id_rsa\"\r\n", 1365 | " ansible_cfg_url: \"https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ansible.cfg\"\r\n", 1366 | " inventory_url: \"https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/inventory\"\r\n", 1367 | "\r\n", 1368 | " tasks:\r\n", 1369 | "\r\n", 1370 | " - name: Install necessary packages of Linux\r\n", 1371 | " block:\r\n", 1372 | "\r\n", 1373 | " - name: Install general linux packages\r\n", 1374 | " package:\r\n", 1375 | " name: \"{{ item }}\"\r\n", 1376 | " state: present\r\n", 1377 | " with_items: \"{{ general_packages }}\"\r\n", 1378 | " when:\r\n", 1379 | " - general_packages is defined\r\n", 1380 | " - ansible_pkg_mgr != \"portage\"\r\n", 1381 | "\r\n", 1382 | " - name: Install apk packages on Alpine Linux\r\n", 1383 | " apk:\r\n", 1384 | " name: \"{{ item }}\"\r\n", 1385 | " state: present\r\n", 1386 | " with_items: \"{{ apk_packages }}\"\r\n", 1387 | " when:\r\n", 1388 | " - apk_packages is defined\r\n", 1389 | " - ansible_pkg_mgr == \"apk\"\r\n", 1390 | "\r\n", 1391 | " - name: Install apt packages on Debian and Ubuntu\r\n", 1392 | " apt:\r\n", 1393 | " name: \"{{ item }}\"\r\n", 1394 | " state: present\r\n", 1395 | " with_items: \"{{ apt_packages }}\"\r\n", 1396 | " when:\r\n", 1397 | " - apt_packages is defined\r\n", 1398 | " - ansible_pkg_mgr == \"apt\"\r\n", 1399 | "\r\n", 1400 | " - name: Install pacman packages on Arch Linux\r\n", 1401 | " pacman:\r\n", 1402 | " name: \"{{ item }}\"\r\n", 1403 | " state: present\r\n", 1404 | " with_items: \"{{ pacman_packages }}\"\r\n", 1405 | " when:\r\n", 1406 | " - pacman_packages is defined\r\n", 1407 | " - ansible_pkg_mgr == \"pacman\"\r\n", 1408 | "\r\n", 1409 | " - name: Install portage packages on Gentoo Linux\r\n", 1410 | " portage:\r\n", 1411 | " package: \"{{ item }}\"\r\n", 1412 | " state: present\r\n", 1413 | " with_items:\r\n", 1414 | " - \"{{ portage_packages }}\"\r\n", 1415 | " when:\r\n", 1416 | " - portage_packages is defined\r\n", 1417 | " - ansible_pkg_mgr == \"portage\"\r\n", 1418 | "\r\n", 1419 | " - name: Install yum packages on CentOS\r\n", 1420 | " yum:\r\n", 1421 | " name: \"{{ item }}\"\r\n", 1422 | " state: present\r\n", 1423 | " with_items: \"{{ yum_packages }}\"\r\n", 1424 | " when:\r\n", 1425 | " - yum_packages is defined\r\n", 1426 | " - ansible_pkg_mgr == \"yum\"\r\n", 1427 | "\r\n", 1428 | " - name: Install zypper packages on openSUSE\r\n", 1429 | " zypper:\r\n", 1430 | " name: \"{{ item }}\"\r\n", 1431 | " state: present\r\n", 1432 | " with_items: \"{{ zypper_packages }}\"\r\n", 1433 | " when:\r\n", 1434 | " - zypper_packages is defined\r\n", 1435 | " - ansible_pkg_mgr == \"zypper\"\r\n", 1436 | "\r\n", 1437 | " - name: Install necessary packages of Python\r\n", 1438 | " block:\r\n", 1439 | "\r\n", 1440 | " - name: Install general pip packages\r\n", 1441 | " pip:\r\n", 1442 | " name: \"{{ item }}\"\r\n", 1443 | " state: present\r\n", 1444 | " with_items: \"{{ pip_packages }}\"\r\n", 1445 | " when: pip_packages is defined\r\n", 1446 | "\r\n", 1447 | " - name: Install pysqlite on gentoo\r\n", 1448 | " pip:\r\n", 1449 | " name: pysqlite\r\n", 1450 | " state: present\r\n", 1451 | " when:\r\n", 1452 | " - ansible_pkg_mgr == \"portage\"\r\n", 1453 | "\r\n", 1454 | " - name: Upgrade six\r\n", 1455 | " pip:\r\n", 1456 | " name: six\r\n", 1457 | " state: latest\r\n", 1458 | " tags: skip_ansible_lint\r\n", 1459 | "\r\n", 1460 | " - name: Install and configuration Jupyter (application)\r\n", 1461 | " block:\r\n", 1462 | "\r\n", 1463 | " - name: Install jupyter\r\n", 1464 | " pip:\r\n", 1465 | " name: jupyter\r\n", 1466 | " version: 1.0.0\r\n", 1467 | " state: present\r\n", 1468 | "\r\n", 1469 | " # Disable jupyter authentication token. (1/2)\r\n", 1470 | " - name: Create `/root/.jupyter` directory\r\n", 1471 | " file:\r\n", 1472 | " path: /root/.jupyter\r\n", 1473 | " state: directory\r\n", 1474 | " mode: 0700\r\n", 1475 | "\r\n", 1476 | " # Disable jupyter authentication token. (2/2)\r\n", 1477 | " - name: Get jupyter_notebook_config.py\r\n", 1478 | " get_url:\r\n", 1479 | " url: \"{{ jupyter_notebook_config_py_url }}\"\r\n", 1480 | " dest: /root/.jupyter/jupyter_notebook_config.py\r\n", 1481 | " mode: 0644\r\n", 1482 | " checksum: md5:c663914a24281ddf10df6bc9e7238b07\r\n", 1483 | "\r\n", 1484 | " - name: Integrate Ansible and Jupyter\r\n", 1485 | " block:\r\n", 1486 | "\r\n", 1487 | " - name: Create `/root/.ssh` directory\r\n", 1488 | " file:\r\n", 1489 | " path: /root/.ssh\r\n", 1490 | " state: directory\r\n", 1491 | " mode: 0700\r\n", 1492 | "\r\n", 1493 | " - name: Get ssh private key\r\n", 1494 | " get_url:\r\n", 1495 | " url: \"{{ ssh_private_key_url }}\"\r\n", 1496 | " dest: /root/.ssh/id_rsa\r\n", 1497 | " mode: 0600\r\n", 1498 | " checksum: md5:6cc26e77bf23a9d72a51b22387bea61f\r\n", 1499 | "\r\n", 1500 | " - name: Get ansible.cfg file\r\n", 1501 | " get_url:\r\n", 1502 | " url: \"{{ ansible_cfg_url }}\"\r\n", 1503 | " dest: /home/\r\n", 1504 | " mode: 0644\r\n", 1505 | "\r\n", 1506 | " - name: Get inventory file\r\n", 1507 | " get_url:\r\n", 1508 | " url: \"{{ inventory_url }}\"\r\n", 1509 | " dest: /home/\r\n", 1510 | " mode: 0644\r\n", 1511 | "\r\n", 1512 | "# vim: ft=yaml.ansible :\r\n" 1513 | ] 1514 | } 1515 | ], 1516 | "source": [ 1517 | "!cat setup_jupyter.yml" 1518 | ] 1519 | }, 1520 | { 1521 | "cell_type": "markdown", 1522 | "metadata": {}, 1523 | "source": [ 1524 | "Run the `setup_jupyter.yml` playbook." 1525 | ] 1526 | }, 1527 | { 1528 | "cell_type": "code", 1529 | "execution_count": 17, 1530 | "metadata": {}, 1531 | "outputs": [ 1532 | { 1533 | "name": "stdout", 1534 | "output_type": "stream", 1535 | "text": [ 1536 | "\n", 1537 | "PLAY [Setup Ansible-Jupyter] ***************************************************\n", 1538 | "\n", 1539 | "TASK [Gathering Facts] *********************************************************\n", 1540 | "\u001b[0;32mok: [localhost]\u001b[0m\n", 1541 | "\n", 1542 | "TASK [Install general linux packages] ******************************************\n", 1543 | "\u001b[0;32mok: [localhost] => (item=bash)\u001b[0m\n", 1544 | "\u001b[0;32mok: [localhost] => (item=bash-completion)\u001b[0m\n", 1545 | "\u001b[0;32mok: [localhost] => (item=ca-certificates)\u001b[0m\n", 1546 | "\u001b[0;32mok: [localhost] => (item=curl)\u001b[0m\n", 1547 | "\u001b[0;32mok: [localhost] => (item=git)\u001b[0m\n", 1548 | "\u001b[0;32mok: [localhost] => (item=openssl)\u001b[0m\n", 1549 | "\u001b[0;32mok: [localhost] => (item=sshpass)\u001b[0m\n", 1550 | "\n", 1551 | "TASK [Install apk packages on Alpine Linux] ************************************\n", 1552 | "\u001b[0;36mskipping: [localhost] => (item=[]) \u001b[0m\n", 1553 | "\n", 1554 | "TASK [Install apt packages on Debian and Ubuntu] *******************************\n", 1555 | "\u001b[0;36mskipping: [localhost] => (item=[]) \u001b[0m\n", 1556 | "\n", 1557 | "TASK [Install pacman packages on Arch Linux] ***********************************\n", 1558 | "\u001b[0;32mok: [localhost] => (item=['openssh', 'vim'])\u001b[0m\n", 1559 | "\n", 1560 | "TASK [Install portage packages on Gentoo Linux] ********************************\n", 1561 | "\u001b[0;36mskipping: [localhost] => (item=bash) \u001b[0m\n", 1562 | "\u001b[0;36mskipping: [localhost] => (item=bash-completion) \u001b[0m\n", 1563 | "\u001b[0;36mskipping: [localhost] => (item=ca-certificates) \u001b[0m\n", 1564 | "\u001b[0;36mskipping: [localhost] => (item=dev-vcs/git) \u001b[0m\n", 1565 | "\u001b[0;36mskipping: [localhost] => (item=net-misc/curl) \u001b[0m\n", 1566 | "\u001b[0;36mskipping: [localhost] => (item=openssh) \u001b[0m\n", 1567 | "\u001b[0;36mskipping: [localhost] => (item=openssl) \u001b[0m\n", 1568 | "\u001b[0;36mskipping: [localhost] => (item=sqlite) \u001b[0m\n", 1569 | "\u001b[0;36mskipping: [localhost] => (item=vim) \u001b[0m\n", 1570 | "\n", 1571 | "TASK [Install yum packages on CentOS] ******************************************\n", 1572 | "\u001b[0;36mskipping: [localhost] => (item=[]) \u001b[0m\n", 1573 | "\n", 1574 | "TASK [Install zypper packages on openSUSE] *************************************\n", 1575 | "\u001b[0;36mskipping: [localhost] => (item=[]) \u001b[0m\n", 1576 | "\n", 1577 | "TASK [Install general pip packages] ********************************************\n", 1578 | "\u001b[0;32mok: [localhost] => (item=docker-py)\u001b[0m\n", 1579 | "\u001b[0;32mok: [localhost] => (item=docker-compose)\u001b[0m\n", 1580 | "\n", 1581 | "TASK [Install pysqlite on gentoo] **********************************************\n", 1582 | "\u001b[0;36mskipping: [localhost]\u001b[0m\n", 1583 | "\n", 1584 | "TASK [Upgrade six] *************************************************************\n", 1585 | "\u001b[0;32mok: [localhost]\u001b[0m\n", 1586 | "\n", 1587 | "TASK [Install jupyter] *********************************************************\n", 1588 | "\u001b[0;32mok: [localhost]\u001b[0m\n", 1589 | "\n", 1590 | "TASK [Create `/root/.jupyter` directory] ***************************************\n", 1591 | "\u001b[0;32mok: [localhost]\u001b[0m\n", 1592 | "\n", 1593 | "TASK [Get jupyter_notebook_config.py] ******************************************\n", 1594 | "\u001b[0;32mok: [localhost]\u001b[0m\n", 1595 | "\n", 1596 | "TASK [Create `/root/.ssh` directory] *******************************************\n", 1597 | "\u001b[0;32mok: [localhost]\u001b[0m\n", 1598 | "\n", 1599 | "TASK [Get ssh private key] *****************************************************\n", 1600 | "\u001b[0;32mok: [localhost]\u001b[0m\n", 1601 | "\n", 1602 | "TASK [Get ansible.cfg file] ****************************************************\n", 1603 | "\u001b[0;32mok: [localhost]\u001b[0m\n", 1604 | "\n", 1605 | "TASK [Get inventory file] ******************************************************\n", 1606 | "\u001b[0;33mchanged: [localhost]\u001b[0m\n", 1607 | "\n", 1608 | "PLAY RECAP *********************************************************************\n", 1609 | "\u001b[0;33mlocalhost\u001b[0m : \u001b[0;32mok=12 \u001b[0m \u001b[0;33mchanged=1 \u001b[0m unreachable=0 failed=0 \n", 1610 | "\n" 1611 | ] 1612 | } 1613 | ], 1614 | "source": [ 1615 | "!ansible-playbook setup_jupyter.yml" 1616 | ] 1617 | }, 1618 | { 1619 | "cell_type": "markdown", 1620 | "metadata": {}, 1621 | "source": [ 1622 | "Enjoy it !" 1623 | ] 1624 | }, 1625 | { 1626 | "cell_type": "markdown", 1627 | "metadata": {}, 1628 | "source": [ 1629 | "## Reference\n", 1630 | "\n", 1631 | "* [怎麼用 Jupyter 操控 Ansible?(localhost) | 現代 IT 人一定要知道的 Ansible 自動化組態技巧](https://chusiang.gitbooks.io/automate-with-ansible/07.how-to-practive-the-ansible-with-jupyter1.html)\n", 1632 | "* [常用的 Ansible Module 有哪些? | 現代 IT 人一定要知道的 Ansible 自動化組態技巧](https://chusiang.gitbooks.io/automate-with-ansible/12.which-are-the-commonly-used-modules.html)\n", 1633 | "* [怎麼看 Ansible Modules 文件? | 現代 IT 人一定要知道的 Ansible 自動化組態技巧](https://chusiang.gitbooks.io/automate-with-ansible/11.how-to-see-the-ansible-module-document.html)" 1634 | ] 1635 | } 1636 | ], 1637 | "metadata": { 1638 | "kernelspec": { 1639 | "display_name": "Python 3", 1640 | "language": "python", 1641 | "name": "python3" 1642 | }, 1643 | "language_info": { 1644 | "codemirror_mode": { 1645 | "name": "ipython", 1646 | "version": 3 1647 | }, 1648 | "file_extension": ".py", 1649 | "mimetype": "text/x-python", 1650 | "name": "python", 1651 | "nbconvert_exporter": "python", 1652 | "pygments_lexer": "ipython3", 1653 | "version": "3.6.5" 1654 | } 1655 | }, 1656 | "nbformat": 4, 1657 | "nbformat_minor": 1 1658 | } 1659 | --------------------------------------------------------------------------------