townk / ansible-beautiful-output Goto Github PK
View Code? Open in Web Editor NEWA callback plugin for Ansible that displays the playbook execution in a very beautiful way.
License: MIT License
A callback plugin for Ansible that displays the playbook execution in a very beautiful way.
License: MIT License
Hi,
Thanks for your contribution. I was hoping getting ride of text-crazy ansible stdout ouput... But ... python beat/bite me !!!
I configured my ansible as you suggested ans install the requirements : pip3 install watchdog
but I hit this error :
ERROR! Unexpected Exception, this is probably a bug: No module named 'AppKit'
When I try to install it (pip3 install AppKit
), it seems to be OK :
Requirement already satisfied: AppKit in /home/fozodlen/.local/lib/python3.8/site-packages (0.2.8)
Requirement already satisfied: pygobject in /usr/lib/python3/dist-packages (from AppKit) (3.36.0)
Requirement already satisfied: beautifulsoup4 in /home/fozodlen/.local/lib/python3.8/site-packages (from AppKit) (4.9.3)
Requirement already satisfied: flask in /home/fozodlen/.local/lib/python3.8/site-packages (from AppKit) (1.1.2)
Requirement already satisfied: pycairo>=1.11.1 in /usr/lib/python3/dist-packages (from pygobject->AppKit) (1.16.2)
Requirement already satisfied: soupsieve>1.2; python_version >= "3.0" in /home/fozodlen/.local/lib/python3.8/site-packages (from beautifulsoup4->AppKit) (2.2.1)
Requirement already satisfied: click>=5.1 in /usr/lib/python3/dist-packages (from flask->AppKit) (7.0)
Requirement already satisfied: Werkzeug>=0.15 in /home/fozodlen/.local/lib/python3.8/site-packages (from flask->AppKit) (1.0.1)
Requirement already satisfied: itsdangerous>=0.24 in /home/fozodlen/.local/lib/python3.8/site-packages (from flask->AppKit) (1.1.0)
Requirement already satisfied: Jinja2>=2.10.1 in /home/fozodlen/.local/lib/python3.8/site-packages (from flask->AppKit) (2.11.3)
Requirement already satisfied: MarkupSafe>=0.23 in /usr/lib/python3/dist-packages (from Jinja2>=2.10.1->flask->AppKit) (1.1.0)
Any idea what I did wrong? pip3 is the problem?
Sincerly,
I'm trying to use this plugin but it seems that Ansible can't find it:
The offending line appears to be:
roles:
- role: townk.beautiful_output
^ here
My environment is:
Windows 10, with WSL 2.0 running Ubuntu 20.04.
Now, inside that Ubuntu OS, I'm running a container with Ansible. Although this sounds convoluted, this is just a sandbox for the environment in my company. Ultimately, what I want to stress is that I'm not using MacOS. It's ansible on Linux.
With that said, I made sure to add watchdog
to the environment and got the plugin:
$ ansible-galaxy install townk.beautiful_output
- downloading role 'beautiful_output', owned by townk
- downloading role from https://github.com/Townk/ansible-beautiful-output/archive/v0.7.0.tar.gz
- extracting townk.beautiful_output to <redacted>/shared/roles/townk.beautiful_output
- townk.beautiful_output (v0.7.0) was installed successfully
And then I added the role to my playbook:
roles:
- role: townk.beautiful_output
When I execute the playbook, I still get the error:
ERROR! Unexpected Exception, this is probably a bug: No module named 'AppKit'
the full traceback was:
Traceback (most recent call last):
File "/usr/local/bin/ansible-playbook", line 123, in <module>
exit_code = cli.run()
File "/usr/local/lib/python3.7/site-packages/ansible/cli/playbook.py", line 127, in run
results = pbex.run()
File "/usr/local/lib/python3.7/site-packages/ansible/executor/playbook_executor.py", line 99, in run
self._tqm.load_callbacks()
File "/usr/local/lib/python3.7/site-packages/ansible/executor/task_queue_manager.py", line 134, in load_callbacks
self._stdout_callback = callback_loader.get(self._stdout_callback)
File "/usr/local/lib/python3.7/site-packages/ansible/plugins/loader.py", line 552, in get
self._module_cache[path] = self._load_module_source(name, path)
File "/usr/local/lib/python3.7/site-packages/ansible/plugins/loader.py", line 525, in _load_module_source
spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/local/shared/roles/townk.beautiful_output/callback_plugins/beautiful_output.py", line 87, in <module>
from watchdog.observers.fsevents2 import FSEventsObserver2 as Observer
File "/usr/local/lib/python3.7/site-packages/watchdog/observers/fsevents2.py", line 47, in <module>
import AppKit
ModuleNotFoundError: No module named 'AppKit'
From the docs, I understood AppKit would be required only for MacOS, but not for Linux.
Also, in that case, the suggestion is to not install AppKit directly, but a few other packages instead.
Could you clarify what should I do next to be able to use this role in Linux?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.