Guest User

Untitled

a guest
Oct 22nd, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.25 KB | None | 0 0
  1. {
  2. "cells": [
  3. {
  4. "cell_type": "markdown",
  5. "metadata": {},
  6. "source": [
  7. "## User Story\n",
  8. "```\n",
  9. "Feature: Interactive HTML widgets for Jupyter notebooks.\n",
  10. " In order to better understand the network topology\n",
  11. " As a user I would like to have jupyter use html and d3.js graphs\n",
  12. " So that I can display network diagrams interactively\n",
  13. "\n",
  14. " Scenario: Bootstrapping\n",
  15. " Given Jupyter is deployed with ansible kernel\n",
  16. " when nmap or nbextention is not availalble\n",
  17. " Then this playbook should install nbextention and jupyter-cron\n",
  18. " And this playbook should install nmap\n",
  19. "\n",
  20. " Scenario: Scanning\n",
  21. " Given Jupyter is deployed with ansible kernel\n",
  22. " And Bootstrapping has been executed\n",
  23. " Then jupyter-cron should be configured to execute nmap\n",
  24. " And nmap output should be in grep text\n",
  25. " And nmap output should be parsed as a network diagram\n",
  26. "```"
  27. ]
  28. },
  29. {
  30. "cell_type": "code",
  31. "execution_count": 13,
  32. "metadata": {},
  33. "outputs": [],
  34. "source": [
  35. "#inventory\n",
  36. "[all]\n",
  37. "localhost"
  38. ]
  39. },
  40. {
  41. "cell_type": "code",
  42. "execution_count": null,
  43. "metadata": {},
  44. "outputs": [
  45. {
  46. "name": "stdout",
  47. "output_type": "stream",
  48. "text": [
  49. "\n"
  50. ]
  51. }
  52. ],
  53. "source": [
  54. "#play\n",
  55. "name: Install widgetsnbextension\n",
  56. "hosts: all\n",
  57. "become: yes\n",
  58. "roles:\n",
  59. " - { role: davidedelvento.jupyterextension, name: widgetsnbextension }\n",
  60. " - { role: ieguiguren.nmap }"
  61. ]
  62. },
  63. {
  64. "cell_type": "code",
  65. "execution_count": null,
  66. "metadata": {},
  67. "outputs": [],
  68. "source": [
  69. "#task\n",
  70. "name: should install jupyter-cron\n",
  71. "pip:\n",
  72. " name: jupyter-cron\n",
  73. " state: present"
  74. ]
  75. },
  76. {
  77. "cell_type": "code",
  78. "execution_count": null,
  79. "metadata": {},
  80. "outputs": [],
  81. "source": []
  82. }
  83. ],
  84. "metadata": {
  85. "kernelspec": {
  86. "display_name": "Ansible",
  87. "language": "ansible",
  88. "name": "ansible"
  89. },
  90. "language_info": {
  91. "codemirror_mode": "yaml",
  92. "file_extension": ".yml",
  93. "mimetype": "text/yaml",
  94. "name": "ansible"
  95. }
  96. },
  97. "nbformat": 4,
  98. "nbformat_minor": 2
  99. }
Add Comment
Please, Sign In to add comment