From 3f64afe56a576f0540e7f0855d565b4a224fddc3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Jan 2024 00:08:05 +0100 Subject: [PATCH] chore(deps): update ansible-core requirement from <2.16,>=2.15 to >=2.15,<2.17 (#164) Updates the requirements on [ansible-core](https://github.com/ansible/ansible) to permit the latest version.
Release notes

Sourced from ansible-core's releases.

v2.16.0

Changelog

See the full changelog for the changes included in this release.

Release Artifacts

Commits

You can trigger a rebase of this PR by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
> **Note** > Automatic rebases have been disabled on this pull request as it has been open for over 30 days. --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mohamed El Mouctar HAIDARA --- ansibleplaybookgrapher/parser.py | 11 +++++++++-- requirements.txt | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ansibleplaybookgrapher/parser.py b/ansibleplaybookgrapher/parser.py index f48df70e..6a8779b5 100644 --- a/ansibleplaybookgrapher/parser.py +++ b/ansibleplaybookgrapher/parser.py @@ -18,9 +18,11 @@ from ansible.cli import CLI from ansible.errors import AnsibleParserError, AnsibleUndefinedVariable, AnsibleError from ansible.parsing.yaml.objects import AnsibleUnicode -from ansible.playbook import Playbook, Play +from ansible.playbook import Playbook from ansible.playbook.block import Block from ansible.playbook.helpers import load_list_of_blocks +from ansible.playbook.play import Play +from ansible.playbook.role import Role from ansible.playbook.role_include import IncludeRole from ansible.playbook.task import Task from ansible.playbook.task_include import TaskInclude @@ -213,13 +215,18 @@ def parse(self, *args, **kwargs) -> PlaybookNode: # loop through the roles display.v("Parsing roles...") - for role in play.get_roles(): + for role in play.get_roles(): # type: Role # Don't insert tasks from ``import/include_role``, preventing duplicate graphing if role.from_include: continue # the role object doesn't inherit the tags from the play. So we add it manually. role.tags = role.tags + play.tags + + # More context on this line, see here: https://github.com/ansible/ansible/issues/82310 + # This seems to work for now. + role._parent = None + if not role.evaluate_tags( only_tags=self.tags, skip_tags=self.skip_tags, all_vars=play_vars ): diff --git a/requirements.txt b/requirements.txt index 3c8b9cd8..c11a130b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -ansible-core>=2.15,<2.15.5 +ansible-core>=2.15,<2.16.1 graphviz>=0.18,<1 colour<1 lxml<6