You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
It seems like this feature has been requested before at #39, but I'll just describe my use case.
I have a playbook with a role test. The role test has a dependency defined in meta/main.yml for the role test2. Both roles contain one task.
When I issue ansible-playbook --list-tasks playbook-test.yml it shows the two tasks below the play. So there is no way to see that these tasks are part of a role or a dependant role.
It would however be great if this role dependency would be visible in the generated graph of ansible-playbook-grapher! And as said before it seems this feature was implemented in 12cee0f
To Reproduce playbook-test.yml
---
- name: test
hosts: localhost
gather_facts: false
roles:
- role: test
test/meta/main.yml
dependencies:
- role: test2
test/tasks/main.yml
---
- name: Task from role test
ansible.builtin.debug:
msg: Msg from a task from role test
test2/tasks/main.yml
---
- name: Task from role test2
ansible.builtin.debug:
msg: Msg from a task from role test2
Expected behavior
It would be nice when the role dependency was visible in the graph.
Screenshots
Something like:
instead of:
Versions:
Outputs of :
ansible --version
ansible [core 2.17.6]
config file = ansible.cfg
configured module search path = ['/home/geertsky/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/geertsky/miniforge3/envs/ansible-2.17.6-playbook-grapher/lib/python3.13/site-packages/ansible
ansible collection location = /home/geertsky/.ansible/collections:/usr/share/ansible/collections
executable location = /home/geertsky/miniforge3/envs/ansible-2.17.6-playbook-grapher/bin/ansible
python version = 3.13.1 | packaged by conda-forge | (main, Dec 5 2024, 21:23:54) [GCC 13.3.0] (/home/geertsky/miniforge3/envs/ansible-2.17.6-playbook-grapher/bin/python3.13)
jinja version = 3.1.4
libyaml = True
**Additional context**
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
The grapher already does support the role dependencies since the tasks from both roles are added to the graph. What you are describing is kind of a feature request or a modification of the current behavior. At the end of the day, all tasks are in the graph.
Not sure how easy it might be to track the role dependencies separately as roles themself in the graph but will see...
haidaraM
changed the title
[Bug report] Add support for role dependencies #39 seems lost
[Feature request] Add role dependencies as separate nodes
Dec 29, 2024
Describe the bug
It seems like this feature has been requested before at #39, but I'll just describe my use case.
I have a playbook with a role
test
. The roletest
has a dependency defined inmeta/main.yml
for the roletest2
. Both roles contain one task.When I issue
ansible-playbook --list-tasks playbook-test.yml
it shows the two tasks below the play. So there is no way to see that these tasks are part of a role or a dependant role.It would however be great if this role dependency would be visible in the generated graph of
ansible-playbook-grapher
! And as said before it seems this feature was implemented in 12cee0fTo Reproduce
playbook-test.yml
test/meta/main.yml
test/tasks/main.yml
test2/tasks/main.yml
Expected behavior
It would be nice when the role dependency was visible in the graph.
Screenshots
Something like:
instead of:
Versions:
Outputs of :
ansible --version
The text was updated successfully, but these errors were encountered: