-
Hi there, MWE: - name: Test grapher
hosts: foobar
gather_facts: False
tasks:
- name: foo
assert: { that: true }
changed_when: true
- name: bar
assert: { that: true }
changed_when: true
notify: quux
handlers:
- name: quux
assert: { that: true } Notice the Then (expect handler to be triggered): $ ansible-playbook --check test.yml
PLAY [Test grapher] ************************************************************
TASK [foo] *********************************************************************
changed: [foobar] => {
"changed": true,
"msg": "All assertions passed"
}
TASK [bar] *********************************************************************
changed: [foobar] => {
"changed": true,
"msg": "All assertions passed"
}
RUNNING HANDLER [quux] *********************************************************
ok: [foobar] => {
"changed": false,
"msg": "All assertions passed"
}
PLAY RECAP *********************************************************************
foobar : ok=3 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 I'd expect grapher to show a handler node linked to its notifying task node, but $ ansible-playbook-grapher --renderer mermaid-flowchart test.yml gives: ---
title: Ansible Playbook Grapher
---
%%{ init: { "flowchart": { "curve": "bumpX" } } }%%
flowchart LR
%% Start of the playbook 'playbooks/test.yml'
playbook_56f3dcb5("playbooks/test.yml")
%% Start of the play 'Play: Test grapher (1)'
play_b92d44b7["Play: Test grapher (1)"]
style play_b92d44b7 fill:#1383b9,color:#ffffff
playbook_56f3dcb5 --> |"1"| play_b92d44b7
linkStyle 0 stroke:#1383b9,color:#1383b9
task_44193561["[task] foo"]
style task_44193561 stroke:#1383b9,fill:#ffffff
play_b92d44b7 --> |"1"| task_44193561
linkStyle 1 stroke:#1383b9,color:#1383b9
task_4efd8c98["[task] bar"]
style task_4efd8c98 stroke:#1383b9,fill:#ffffff
play_b92d44b7 --> |"2"| task_4efd8c98
linkStyle 2 stroke:#1383b9,color:#1383b9
%% End of the play 'Play: Test grapher (1)'
%% End of the playbook 'playbooks/test.yml'
No handler shown! Is it normal? Cheers, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hmm I think I have never considered the handlers. Let me check if I can include them in the graph. |
Beta Was this translation helpful? Give feedback.
-
Let's continue the discussion on the "issue": I'm closing this discussion: #214 |
Beta Was this translation helpful? Give feedback.
Let's continue the discussion on the "issue": I'm closing this discussion: #214