Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## User Story\n",
- "```\n",
- "Feature: Interactive HTML widgets for Jupyter notebooks.\n",
- " In order to better understand the network topology\n",
- " As a user I would like to have jupyter use html and d3.js graphs\n",
- " So that I can display network diagrams interactively\n",
- "\n",
- " Scenario: Bootstrapping\n",
- " Given Jupyter is deployed with ansible kernel\n",
- " when nmap or nbextention is not availalble\n",
- " Then this playbook should install nbextention and jupyter-cron\n",
- " And this playbook should install nmap\n",
- "\n",
- " Scenario: Scanning\n",
- " Given Jupyter is deployed with ansible kernel\n",
- " And Bootstrapping has been executed\n",
- " Then jupyter-cron should be configured to execute nmap\n",
- " And nmap output should be in grep text\n",
- " And nmap output should be parsed as a network diagram\n",
- "```"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 13,
- "metadata": {},
- "outputs": [],
- "source": [
- "#inventory\n",
- "[all]\n",
- "localhost"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n"
- ]
- }
- ],
- "source": [
- "#play\n",
- "name: Install widgetsnbextension\n",
- "hosts: all\n",
- "become: yes\n",
- "roles:\n",
- " - { role: davidedelvento.jupyterextension, name: widgetsnbextension }\n",
- " - { role: ieguiguren.nmap }"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": [
- "#task\n",
- "name: should install jupyter-cron\n",
- "pip:\n",
- " name: jupyter-cron\n",
- " state: present"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": []
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Ansible",
- "language": "ansible",
- "name": "ansible"
- },
- "language_info": {
- "codemirror_mode": "yaml",
- "file_extension": ".yml",
- "mimetype": "text/yaml",
- "name": "ansible"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 2
- }
Add Comment
Please, Sign In to add comment