Earlier quoted context omitted.
Try it on Binder here: https://mybinder.org/v2/gh/ansible/ansible-jupyter-kernel/ma...
Hi, and thank you. It works well. Example play books already contain the basics I'd need for my playbooks. Could you perhaps elaborate how the kernel directs Ansible? Also, is there any difference between local and remote Ansible runs?
Show HN: Ansible Kernel – Run Ansible Tasks and Plays with Jupyter Notebook
21–28 of 28 posts
Re: Show HN: Ansible Kernel – Run Ansible Tasks and Plays with Jupyter Notebook
#22Earlier quoted context omitted.
I have more of an opinion there: Maybe programming should be more like data science. Prototypes are thrown away, but must exist at one point. They should be encouraged - like versionning, it is part of a core of good practices that admit few exceptions External dependencies, state etc will all be handled, once excution is ironed out
Sure, but that's not super different that series of commits along a feature branch. I think they accomplish the same goal. But am not dismissing notebooks as a way of doing that. I'm more familiar with ipython than jupyter, but particularly for more algorithmically complex programming tasks I think notebooks are a good tool. I disagree with you only that this might be a good way of prototyping for something like ansi…
Re: Show HN: Ansible Kernel – Run Ansible Tasks and Plays with Jupyter Notebook
#23Until there is a meaningful `git diff` for jupyter notebooks I can't see them being a step in the right direction for anything but transient experiments (and of course what Jypyter is great at; communication, documentation, low barriers etc.)
This is effectively a solved problem, but it does require some tooling. Pre-commit hooks can strip things like execution count and/or outputs from the notebook: https://gist.github.com/minrk/6176788
Re: Show HN: Ansible Kernel – Run Ansible Tasks and Plays with Jupyter Notebook
#24Earlier quoted context omitted.
This is effectively a solved problem, but it does require some tooling. Pre-commit hooks can strip things like execution count and/or outputs from the notebook: https://gist.github.com/minrk/6176788
Thanks will give this a try
This post has more detail on a faster approach using jq: http://timstaley.co.uk/posts/making-git-and-jupyter-notebook...
Re: Show HN: Ansible Kernel – Run Ansible Tasks and Plays with Jupyter Notebook
#25Until there is a meaningful `git diff` for jupyter notebooks I can't see them being a step in the right direction for anything but transient experiments (and of course what Jypyter is great at; communication, documentation, low barriers etc.)
This is effectively a solved problem, but it does require some tooling. Pre-commit hooks can strip things like execution count and/or outputs from the notebook: https://gist.github.com/minrk/6176788
Re: Show HN: Ansible Kernel – Run Ansible Tasks and Plays with Jupyter Notebook
#26Until there is a meaningful `git diff` for jupyter notebooks I can't see them being a step in the right direction for anything but transient experiments (and of course what Jypyter is great at; communication, documentation, low barriers etc.)
Re: Show HN: Ansible Kernel – Run Ansible Tasks and Plays with Jupyter Notebook
#27Earlier quoted context omitted.
Hi, and thank you. It works well. Example play books already contain the basics I'd need for my playbooks. Could you perhaps elaborate how the kernel directs Ansible? Also, is there any difference between local and remote Ansible runs?
Ansible Kernel calls ansible-playbook on a specially constructed playbook. Ansible Kernel constructs a playbook with a two tasks in it: 1. wait for the kernel and 2. include tasks from a file that does not exist yet. When you enter a #task cell we write that included file and then tell the wait task to proceed. The included file contains the #task cell contents, a wait task, and another include task. This continues u…
I came across this Python wrapper around Ansible yesterday: http://suitable.readthedocs.io/en/latest/ Official docs declare themselves deprecated...
Anyway, I'll have to start testing this soon. Thank you so much for making it!
Re: Show HN: Ansible Kernel – Run Ansible Tasks and Plays with Jupyter Notebook
#28Earlier quoted context omitted.
Ansible Kernel calls ansible-playbook on a specially constructed playbook. Ansible Kernel constructs a playbook with a two tasks in it: 1. wait for the kernel and 2. include tasks from a file that does not exist yet. When you enter a #task cell we write that included file and then tell the wait task to proceed. The included file contains the #task cell contents, a wait task, and another include task. This continues u…
This does sound like Ansible does not make it easy to control it from pure Python. It looks an ingenious way to get around it. I came across this Python wrapper around Ansible yesterday: http://suitable.readthedocs.io/en/latest/ Official docs declare themselves deprecated... Anyway, I'll have to start testing this soon. Thank you so much for making it!