{"id":1957,"date":"2023-12-06T19:35:18","date_gmt":"2023-12-06T18:35:18","guid":{"rendered":"https:\/\/robermb.com\/blog\/?p=1957"},"modified":"2023-12-07T17:57:14","modified_gmt":"2023-12-07T16:57:14","slug":"run-ansible-tasks-from-jupiter-notebooks","status":"publish","type":"post","link":"https:\/\/robermb.com\/blog\/geeks\/run-ansible-tasks-from-jupiter-notebooks\/","title":{"rendered":"Run Ansible tasks from Jupiter Notebooks"},"content":{"rendered":"\n<p>Usually when we are developing some Python code it&#8217;s convenient to use the Jupyter Notebook tool to test some block of code without having to create scripts, projects, etc.<\/p>\n\n\n\n<p>That&#8217;s why there is a GitHub project(from <a href=\"https:\/\/github.com\/benthomasson\">ben thomasson<\/a>) that I find very interesting that allows to use Jupyter Noterbook to run Ansible code blocks to test our code before an implementation, which sometimes is super useful.<\/p>\n\n\n\n<p>The Ansible&nbsp;<a href=\"http:\/\/jupyter.readthedocs.io\/en\/latest\/\">Jupyter<\/a>&nbsp;Kernel adds a kernel backend for Jupyter to interface directly with Ansible and construct plays and tasks and execute them on the fly.<\/p>\n\n\n\n<p><span style=\"text-decoration: underline;\">GitHub project<\/span>: <\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/ansible\/ansible-jupyter-kernel\">https:\/\/github.com\/ansible\/ansible-jupyter-kernel<\/a><\/p>\n\n\n\n<p><span style=\"text-decoration: underline;\">Video<\/span>:<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-vimeo wp-block-embed-vimeo\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Run Ansible Tasks from a Jupyter Notebook!\" src=\"https:\/\/player.vimeo.com\/video\/279049946?dnt=1&amp;app_id=122963\" width=\"960\" height=\"582\" frameborder=\"0\" allow=\"autoplay; fullscreen; picture-in-picture; clipboard-write\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p><a href=\"https:\/\/vimeo.com\/279049946\">Run Ansible Tasks from a Jupyter Notebook!<\/a> from <a href=\"https:\/\/vimeo.com\/user7695781\">ben thomasson<\/a> on <a href=\"https:\/\/vimeo.com\">Vimeo<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Usually when we are developing some Python code it&#8217;s convenient to use the Jupyter Notebook tool to test some block &hellip; <a href=\"https:\/\/robermb.com\/blog\/geeks\/run-ansible-tasks-from-jupiter-notebooks\/\" class=\"more-link\">More <span class=\"screen-reader-text\">Run Ansible tasks from Jupiter Notebooks<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":1962,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[103,2],"tags":[106,112,128,126,129],"_links":{"self":[{"href":"https:\/\/robermb.com\/blog\/wp-json\/wp\/v2\/posts\/1957"}],"collection":[{"href":"https:\/\/robermb.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/robermb.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/robermb.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/robermb.com\/blog\/wp-json\/wp\/v2\/comments?post=1957"}],"version-history":[{"count":5,"href":"https:\/\/robermb.com\/blog\/wp-json\/wp\/v2\/posts\/1957\/revisions"}],"predecessor-version":[{"id":1967,"href":"https:\/\/robermb.com\/blog\/wp-json\/wp\/v2\/posts\/1957\/revisions\/1967"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/robermb.com\/blog\/wp-json\/wp\/v2\/media\/1962"}],"wp:attachment":[{"href":"https:\/\/robermb.com\/blog\/wp-json\/wp\/v2\/media?parent=1957"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/robermb.com\/blog\/wp-json\/wp\/v2\/categories?post=1957"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/robermb.com\/blog\/wp-json\/wp\/v2\/tags?post=1957"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}