• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

haidaraM / ansible-playbook-grapher / 12538767153
96%
master: 95%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 29 Dec 2024 09:15PM UTC
Jobs 6
Files 11
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Dec 2024 09:14PM UTC coverage: 93.228% (+0.4%) from 92.857%
12538767153

push

github

web-flow
doc/tests: import_role doesn't have the same behavior as include_role (#231)

Ansible executor engine treats them very differently:

- All `import*` statements are pre-processed at the time playbooks are
parsed.
- All `include*` statements are processed as they are encountered during
the execution of the playbook.

From
https://docs.ansible.com/ansible/2.9/user_guide/playbooks_reuse_includes.html

---

What does mean for you: The tasks imported by an `import_role` are now
**always added** to the graph regardless of the usage of
`--include-role-tasks`. This behavior was introduced by #228. Since the
`import*` statements are pre-processed when the playbook is parsed, it's
not trivial to know the tasks are from an `import_role`. I might
eventually change this if people want the same output as the
`include_role` (a dedicated note for the import role as well).

## Example

From this playbook:

```yaml
# tmp.yml
---
  - hosts: all
    tags:
      - play1
    roles:
      - role: fake_role
        tags:
          - role_tag

    tasks:
      - name: Hello world
        debug:
          msg: Hello world
      - name: Import role
        import_role:
          name: display_some_facts
```

**Before:**

```mermaid
---
title: "ansible-playbook-grapher tmp.yml --renderer mermaid-flowchart"
---
%%{ init: { "flowchart": { "curve": "bumpX" } } }%%
flowchart LR
	%% Start of the playbook 'tmp.yml'
	playbook_338db25c("tmp.yml")
		%% Start of the play 'Play: all (0)'
		play_4f34a3fe["Play: all (0)"]
		style play_4f34a3fe fill:#bd0faa,color:#ffffff
		playbook_338db25c --> |"1"| play_4f34a3fe
		linkStyle 0 stroke:#bd0faa,color:#bd0faa
			%% Start of the role 'display_some_facts'
			play_4f34a3fe --> |"1"| role_ef0c80d6
			linkStyle 1 stroke:#bd0faa,color:#bd0faa
			role_ef0c80d6(["[role] display_some_facts"])
			style role_ef0c80d6 fill:#bd0faa,color:#ffffff,stroke:#bd0faa
			%% End of the role 'display_some_facts'
		%% End of the play 'Play: all (0)'
	%% End of the playb... (continued)

1005 of 1078 relevant lines covered (93.23%)

5.59 hits per line

Jobs
ID Job ID Ran Files Coverage
1 py3.10-ansible2.16.* - 12538767153.1 29 Dec 2024 09:16PM UTC 0
93.23
GitHub Action Run
2 py3.11-ansible2.17.* - 12538767153.2 29 Dec 2024 09:16PM UTC 0
93.23
GitHub Action Run
3 py3.10-ansible2.17.* - 12538767153.3 29 Dec 2024 09:16PM UTC 0
93.23
GitHub Action Run
4 py3.11-ansible2.16.* - 12538767153.4 29 Dec 2024 09:16PM UTC 0
93.23
GitHub Action Run
5 py3.12-ansible2.18.* - 12538767153.5 29 Dec 2024 09:16PM UTC 0
93.23
GitHub Action Run
6 py3.11-ansible2.18.* - 12538767153.6 29 Dec 2024 09:16PM UTC 0
93.23
GitHub Action Run
Source Files on build 12538767153
Detailed source file information is not available for this build.
  • Back to Repo
  • b94a8b6e on github
  • Prev Build on main (#12497076532)
  • Next Build on main (#12553084480)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc