Git Product home page Git Product logo

Comments (11)

fireman777 avatar fireman777 commented on August 10, 2024 1

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.

haidaraM avatar haidaraM commented on August 10, 2024 1

Interesting. Makes sense!

Should be easily doable!

from ansible-playbook-grapher.

haidaraM avatar haidaraM commented on August 10, 2024 1

--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.

haidaraM avatar haidaraM commented on August 10, 2024 1

Thanks for the feedback, I appreciate it :-)

from ansible-playbook-grapher.

haidaraM avatar haidaraM commented on August 10, 2024 1

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.

haidaraM avatar haidaraM commented on August 10, 2024

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.

fireman777 avatar fireman777 commented on August 10, 2024

Hi @haidaraM,
Sorry for confusing you from my side. I mean plays. Here is a picture where I showed what I mean:
IMG_150324_01
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.

haidaraM avatar haidaraM commented on August 10, 2024

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.

fireman777 avatar fireman777 commented on August 10, 2024

Thank you for your willingness to help. Your project is very interesting and in my opinion, has a great future.

from ansible-playbook-grapher.

fireman777 avatar fireman777 commented on August 10, 2024

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.

haidaraM avatar haidaraM commented on August 10, 2024

Closing this. Will be released in the next version (following days/weeks).

from ansible-playbook-grapher.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.