Comments (11)
Hi @haidaraM,
I think it's a good idea, but I would separate these two options, for example:
--hide-plays-without-roles: hide (don't show) plays without any role;
--hide-plays-without-tasks: hide (don't show) plays without any task.
I can explain why it can be useful: example, in playbook have lot of plays and a lot of combination of tags. Depending on tag that we can select, we will have quite different pictures (graphs). It's important at this moment to have the ability to exclude some plays without roles/tasks, because some projects may have hundreds of plays.
So, my mind is that it's better to have two options: --hide-plays-without-roles and --hide-plays-without-tasks.
We would be very thankful if you could implement such functionality.
from ansible-playbook-grapher.
Interesting. Makes sense!
Should be easily doable!
from ansible-playbook-grapher.
--hide-plays-without-roles: hide (don't show) plays without any role;
This also needs to consider the usages of include_role
inside the play. That means I need to consider all the tasks inside the play to decide if I need to display the play or not (not only the roles set on the play level).
from ansible-playbook-grapher.
Thanks for the feedback, I appreciate it :-)
from ansible-playbook-grapher.
Can you give a try to pip install "ansible-playbook-grapher @ git+https://github.com/haidaraM/ansible-playbook-grapher@hide-plays"
and let me know. I added two new flags.
See #177
from ansible-playbook-grapher.
Hi,
Trying to understand the use case: basically, you just want to display the roles (and their tasks) without any standalone tasks?
from ansible-playbook-grapher.
Hi @haidaraM,
Sorry for confusing you from my side. I mean plays. Here is a picture where I showed what I mean:
It can be useful when you have a lot of plays and some roles won't be executed due to some conditions (tags). Depending on the tags there can be different play shown in the diagram.
P.S.: I've updated the feature request name and description for better understanding.
from ansible-playbook-grapher.
No problem :-)
I got the idea. What do you think about just excluding plays that end up with no tasks at all (not only roles)?
from ansible-playbook-grapher.
Thank you for your willingness to help. Your project is very interesting and in my opinion, has a great future.
from ansible-playbook-grapher.
Hi @haidaraM, I've tested already and it works as expected.
I want to thank you and wish you and your project a powerfull future.
Thanks a lot.
from ansible-playbook-grapher.
Closing this. Will be released in the next version (following days/weeks).
from ansible-playbook-grapher.
Related Issues (20)
- [Feature request] Add rendered graphs to pull requests
- [Feature request] Multiple playbooks in one graph HOT 6
- [Bug report] ansible-playbook-grapher doesnt work with ansible-core 2.13.1
- After upgrading from 1.1.2 to 1.1.3 HOT 5
- [Bug report] Fix Maximum call stack size exceeded
- ansible-playbook-grapher fails with different errors in different versions after upgrading from 1.1.2 to 1.2.0 HOT 3
- [Feature request] Variable mapping option HOT 2
- [Feature request] generate mermaid instead of images HOT 7
- [Bug report] Please bump version of ansible-core HOT 8
- [Feature request] Include inventory graphing and make this the ansible-super-grapher
- [Feature request] Version Bump :) HOT 2
- [Feature request] Automage releases via Github
- Does the tool have run playbooks first? HOT 3
- [Bug report] No support for playbooks using `import_tasks` HOT 2
- include_role within a loop on role name to include generates an error
- [Bug report] Graphviz : properly rank the edges
- [Bug report] TypeError: 'str' object is not callable HOT 7
- [Feature request] Support for blocks in pre_tasks. HOT 13
- [Bug report] Graphviz Rendering: improvements for large number of plays and tasks
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-playbook-grapher.