A command line tool to create a graph representing your Ansible playbook tasks and roles

Overview

Ansible Playbook Grapher

Testing PyPI version Coverage Status

ansible-playbook-grapher is a command line tool to create a graph representing your Ansible playbook plays, tasks and roles. The aim of this project is to have an overview of your playbook.

Inspired by Ansible Inventory Grapher.

Prerequisites

  • Python 3
  • Ansible >= 2.9: If you still use an older version of Ansible, create a virtual environment and install ansible-playbook-grapher. pip will install a version of Ansible >= 2.9 if not already installed. I try to respect Red Hat Ansible Engine Life Cycle for the supported Ansible version.
  • Graphviz: The tool used to generate the graph in SVG.
    $ sudo apt-get install graphviz # or yum install or brew install

Installation

$ pip install ansible-playbook-grapher

Usage

ansible-playbook-grapher tests/fixtures/example.yml

Example

ansible-playbook-grapher --include-role-tasks  tests/fixtures/with_roles.yml

Example

ansible-playbook-grapher tests/fixtures/with_block.yml

Example

Note on block: Since blocks are logical group of tasks, the conditional when is not displayed on the edges pointing to them but on the tasks inside the block. This mimics Ansible behavior regarding the blocks.

CLI options

The available options:

$ ansible-playbook-grapher --help
usage: ansible-playbook-grapher [-h] [-v] [-i INVENTORY]
                                [--include-role-tasks] [-s] [--view]
                                [-o OUTPUT_FILENAME] [--version] [-t TAGS]
                                [--skip-tags SKIP_TAGS] [--vault-id VAULT_IDS]
                                [--ask-vault-pass | --vault-password-file VAULT_PASSWORD_FILES]
                                [-e EXTRA_VARS]
                                playbook

Make graphs from your Ansible Playbooks.

positional arguments:
  playbook              Playbook to graph

optional arguments:
  --ask-vault-pass      ask for vault password
  --include-role-tasks  Include the tasks of the role in the graph.
  --skip-tags SKIP_TAGS
                        only run plays and tasks whose tags do not match these
                        values
  --vault-id VAULT_IDS  the vault identity to use
  --vault-password-file VAULT_PASSWORD_FILES
                        vault password file
  --version             show program's version number and exit
  --view                Automatically open the resulting SVG file with your
                        system’s default viewer application for the file type
  -e EXTRA_VARS, --extra-vars EXTRA_VARS
                        set additional variables as key=value or YAML/JSON, if
                        filename prepend with @
  -h, --help            show this help message and exit
  -i INVENTORY, --inventory INVENTORY
                        specify inventory host path or comma separated host
                        list.
  -o OUTPUT_FILENAME, --output-file-name OUTPUT_FILENAME
                        Output filename without the '.svg' extension. Default:
                        
   
    .svg
  -s, --save-dot-file   Save the dot file used to generate the graph.
  -t TAGS, --tags TAGS  only run plays and tasks tagged with these values
  -v, --verbose         verbose mode (-vvv for more, -vvvv to enable
                        connection debugging)

   

Configuration: ansible.cfg

The content of ansible.cfg is loaded automatically when running the grapher according to Ansible's behavior. The corresponding environment variables are also loaded.

The values in the config file (and their corresponding environment variables) may affect the behavior of the grapher. For example TAGS_RUN and TAGS_SKIP or vault configuration.

More information here.

Contribution

Contributions are welcome. Feel free to contribute by creating an issue or submitting a PR 😃

Dev environment

To setup a new development environment :

  • Install graphviz sudo apt-get install graphviz # or yum install or brew install graphviz
  • (cd tests && pip install -r requirements_tests.txt)

Run the tests and open the generated files in your system’s default viewer application:

export TEST_VIEW_GENERATED_FILE=1
$ make test # run all tests

The graphs are generated in the folder tests/generated_svg. They are also generated as artefacts in Github Actions. Feel free to look at them when submitting PRs.

Comments
  • Do not follow path

    Do not follow path

    hello,

    I just try this tool but I have some issue on path file.

    I have the following file mapping (for sample I have deleted some folder):

    ├── 000-initialize-afs.ym
    ├── tasks
            ├── include_galaxy.yml
            ├── loop_tasks
                    └── _galaxy_resolve_role.yml
    

    When I run : ansible-playbook-grapher 000-initialize-afs.yml

    I get this error :

    Traceback (most recent call last):
      File "/usr/local/bin/ansible-playbook-grapher", line 10, in <module>
        sys.exit(main())
      File "/usr/local/lib/python2.7/dist-packages/ansibleplaybookgrapher/cli.py", line 84, in main
        cli.run()
      File "/usr/local/lib/python2.7/dist-packages/ansibleplaybookgrapher/cli.py", line 32, in run
        skip_tags=self.options.skip_tags)
      File "/usr/local/lib/python2.7/dist-packages/ansibleplaybookgrapher/grapher.py", line 198, in make_graph
        skip_tags=skip_tags)
      File "/usr/local/lib/python2.7/dist-packages/ansibleplaybookgrapher/grapher.py", line 292, in _include_tasks_in_blocks
        skip_tags=skip_tags)
      File "/usr/local/lib/python2.7/dist-packages/ansibleplaybookgrapher/grapher.py", line 276, in _include_tasks_in_blocks
        data = self.data_loader.load_from_file(include_file)
      File "/usr/local/lib/python2.7/dist-packages/ansible/parsing/dataloader.py", line 88, in load_from_file
        (b_file_data, show_content) = self._get_file_contents(file_name)
      File "/usr/local/lib/python2.7/dist-packages/ansible/parsing/dataloader.py", line 156, in _get_file_contents
        raise AnsibleFileNotFound("Unable to retrieve file contents", file_name=file_name)
    ansible.errors.AnsibleFileNotFound: Unable to retrieve file contents
    Could not find or access '/home/ubuntu/AFS/142/playbook-athena-foundation-service-core-infrastructure/loop_tasks/_galaxy_resolve_role.yml'
    

    Of course, /home/ubuntu/AFS/142/playbook-athena-foundation-service-core-infrastructure/loop_tasks/_galaxy_resolve_role.yml do not exist. I have this mapping

    grep _galaxy 000-initialize-afs.yml
          include_tasks: "tasks/include_galaxy.yml"
    
     grep _galaxy tasks/include_galaxy.yml
        stat_galaxy_file: none
      register: stat_galaxy_file
          include_tasks: "loop_tasks/_galaxy_resolve_role.yml"
      when: stat_galaxy_file.stat.exists
    

    If I summarize : 000-initialize-afs.yml call tasks/include_galaxy.yml call loop_tasks/_galaxy_resolve_role.yml

    bug 
    opened by mysiki 14
  • [Feature request] Support for blocks in pre_tasks.

    [Feature request] Support for blocks in pre_tasks.

    Is your feature request related to a problem? Please describe. I use blocks in almost every part of a play where a block is allowed, including pre_tasks, but it seems that the grapher is unable to handle those, and generates an exception, making it unusable in most of my complex playbooks :( I wasn't sure if this was a bug, or a feature request, so pardon me if it is the former, and not the latter.

    Traceback (most recent call last):
      File "/Users/myUserName/.pyenv/versions/venvGraphAnsible/bin/ansible-playbook-grapher", line 8, in <module>
        sys.exit(main())
      File "/Users/myUserName/.pyenv/versions/3.10.0/envs/venvGraphAnsible/lib/python3.10/site-packages/ansibleplaybookgrapher/cli.py", line 126, in main
        cli.run()
      File "/Users/myUserName/.pyenv/versions/3.10.0/envs/venvGraphAnsible/lib/python3.10/site-packages/ansibleplaybookgrapher/cli.py", line 43, in run
        playbook_node = parser.parse()
      File "/Users/myUserName/.pyenv/versions/3.10.0/envs/venvGraphAnsible/lib/python3.10/site-packages/ansibleplaybookgrapher/parser.py", line 154, in parse
        self._include_tasks_in_blocks(current_play=play, parent_nodes=[play_node], block=pre_task_block,
      File "/Users/myUserName/.pyenv/versions/3.10.0/envs/venvGraphAnsible/lib/python3.10/site-packages/ansibleplaybookgrapher/parser.py", line 245, in _include_tasks_in_blocks
        parent_nodes[-1].add_node(f"{node_type}s", EdgeNode(parent_nodes[-1], role_node,
      File "/Users/myUserName/.pyenv/versions/3.10.0/envs/venvGraphAnsible/lib/python3.10/site-packages/ansibleplaybookgrapher/graph.py", line 58, in add_node
        raise Exception(
    Exception: The target composition 'pre_tasks' is unknown. Supported are: ['tasks']
    

    Describe the solution you'd like The same support as found when using blocks in tasks

    Describe alternatives you've considered N/A

    Additional context Love the library when I can use it, but on my complex plays where I use blocks to keep them clean and apply conditionals on large groups of tasks, where I would love to see the graph to explain to people what is going on, it is a no go.

    bug 
    opened by netopsengineer 13
  • [Feature request] graph options and hidden  NOT_TAGGED

    [Feature request] graph options and hidden NOT_TAGGED

    Hi,

    I have few question than can be feature maybe :) :

    • Graph option : It's not possible to provide option about render like in inspired project https://github.com/willthames/ansible-inventory-grapher (- a arg in this project) ?
    • When I run it with -t or --skip-tags, its normal that all the tasks are display but just with different opacity and not clickable ? It's not possible to not export skipped tags ?

    Thank, br

    feature-request 
    opened by mysiki 11
  • [Bug report] TypeError: 'str' object is not callable

    [Bug report] TypeError: 'str' object is not callable

    Describe the bug When you run the ansible-playbook-grapher some_playbook.yml and the command return a TypeError

    To Reproduce ansible-playbook-grapher some_playbook.yml

    Expected behavior Generate svg file for the playbook

    Screenshots image

    Versions: Outputs of :

    • ansible --version

    image

    • ansible-playbook-grapher --version ansible-playbook-grapher 0.11.1 (with ansible 2.11.6) Additional context Using Ubuntu 20.04 LTS WSL
    bug 
    opened by ninhpham0902 7
  • Clicking on a node should open the corresponding file

    Clicking on a node should open the corresponding file

    Is your feature request related to a problem? Please describe. Sometimes when I try to understand a bunch of ansible playbooks, I want to navigate to the playbook that I am looking in the graph. Currently I do it by doing find tool but its very hectic. It would be much better If I click on the node and it should open the file corresponding to that node.

    Describe the solution you'd like It wouldn't be difficult to implement this feature. Just a hint, you could use: graph.attr("node", URL="file name")

    Describe alternatives you've considered I dont know yet, will update soon if have any

    feature-request 
    opened by sonulohani 7
  • [Feature request] Multiple playbooks in one graph

    [Feature request] Multiple playbooks in one graph

    Is your feature request related to a problem? Please describe.

    I have a folder with playbooks and roles. Some of the roles are referenced in multiple playbooks. I would like to generate a graph with all playbooks and referenced roles. When two playbooks reference the same role, I want to have only one node for that role, and edges from both playbook nodes that reference it to that node.

    Describe alternatives you've considered

    for playbook in playbooks/*.yaml
    do
    ansible-playbook-grapher --save-dot-file $playbook
    done
    

    And then manually merge the files. You can use grep roles *.dot | sed -e 's@.*playbooks/roles/\(\S\+\)".*@\1@' | sort | uniq --repeated to extract a list of roles that are actually referenced in multiple playbooks.

    Additional context In case that's interesting, these are the playbooks/roles that I want to graph: https://github.com/magma/magma/tree/master/experimental/cloudstrapper

    feature-request 
    opened by jheidbrink 6
  • Argument parsing fails with ansible 2.9.4

    Argument parsing fails with ansible 2.9.4

    Describe the bug When trying to ask for help it fails while parsing arguments.

    ansible-playbook-grapher --help Traceback (most recent call last): File "/home/smals-nim/venvs/ansible/bin/ansible-playbook-grapher", line 8, in sys.exit(main()) File "/home/smals-nim/venvs/ansible/lib/python3.6/site-packages/ansibleplaybookgrapher/cli.py", line 166, in main cli.parse() File "/home/smals-nim/venvs/ansible/lib/python3.6/site-packages/ansible/cli/init.py", line 362, in parse self.init_parser() File "/home/smals-nim/venvs/ansible/lib/python3.6/site-packages/ansibleplaybookgrapher/cli.py", line 118, in init_parser _add_my_options(self.parser) File "/home/smals-nim/venvs/ansible/lib/python3.6/site-packages/ansibleplaybookgrapher/cli.py", line 35, in _add_my_options parser.add_option('-i', '--inventory', dest='inventory', action="append", AttributeError: 'ArgumentParser' object has no attribute 'add_option'

    Versions: Outputs of :

    • ansible --version: ansible --version
    • ansible-playbook-grapher --version: doesn't work but pip give me: 0.9.1

    Additional context

    • python 3.6 with virtual env
    opened by sylock 6
  • After upgrading from 1.1.2 to 1.1.3

    After upgrading from 1.1.2 to 1.1.3

    Describe the bug After upgrading the library it started to fail with:

    Done parsing Play: Run cluster deployment on prepared hypervisors (1) **********
    Traceback (most recent call last):
      File "/usr/local/bin/ansible-playbook-grapher", line 8, in <module>
        sys.exit(main())
      File "/usr/local/lib/python3.8/dist-packages/ansibleplaybookgrapher/cli.py", line 249, in main
        cli.run()
      File "/usr/local/lib/python3.8/dist-packages/ansibleplaybookgrapher/cli.py", line 71, in run
        svg_path = renderer.render(
      File "/usr/local/lib/python3.8/dist-packages/ansibleplaybookgrapher/renderer.py", line 114, in render
        self._convert_to_graphviz()
      File "/usr/local/lib/python3.8/dist-packages/ansibleplaybookgrapher/renderer.py", line 391, in _convert_to_graphviz
        self.render_node(
      File "/usr/local/lib/python3.8/dist-packages/ansibleplaybookgrapher/renderer.py", line 153, in render_node
        self.render_block(
      File "/usr/local/lib/python3.8/dist-packages/ansibleplaybookgrapher/renderer.py", line 244, in render_block
        self.render_node(
      File "/usr/local/lib/python3.8/dist-packages/ansibleplaybookgrapher/renderer.py", line 161, in render_node
        self.render_role(
      File "/usr/local/lib/python3.8/dist-packages/ansibleplaybookgrapher/renderer.py", line 295, in render_role
        role_color = ":".join([c[0] for c in colors])
      File "/usr/local/lib/python3.8/dist-packages/ansibleplaybookgrapher/renderer.py", line 295, in <listcomp>
        role_color = ":".join([c[0] for c in colors])
    TypeError: 'NoneType' object is not subscriptable
    Error: Process completed with exit code 1.
    

    Versions: Outputs of :

    • ansible --version ansible-5.1.0 ansible-compat-2.2.0 ansible-core-2.12.8
    • ansible-playbook-grapher --version Error from 1.1.2(works) to 1.1.3(broken)
    bug 
    opened by ccamacho 5
  • Unpin requirements

    Unpin requirements

    lxml has a security release in version 4.6.3, however I cannot upgrade to it due to ansible-playbook-grapher pinning it directly. As an installable tool that can interact with a virtualenv, ansible-playbook-grapher should not pin dependencies but declare ranges up until the next backwards-incompatible version, to allow users to fetch such upgrades.

    opened by adamchainz 4
  • TypeError: Can't instantiate abstract class PlaybookGrapherCLI with abstract methods init_parser, post_process_args

    TypeError: Can't instantiate abstract class PlaybookGrapherCLI with abstract methods init_parser, post_process_args

    When following the setup guide on MacOs 10.14 and Ubuntu 18.04 I get an abstract methods error. I installed on a new Ubuntu 18.04 machine when testing.

    Tried with both Python 2.7 and Python 3.6

    vagrant@ubuntu-bionic:/vagrant/provisioning$ ansible-playbook-grapher --help
    Traceback (most recent call last):
      File "/home/vagrant/.local/bin/ansible-playbook-grapher", line 11, in <module>
        sys.exit(main())
      File "/home/vagrant/.local/lib/python2.7/site-packages/ansibleplaybookgrapher/cli.py", line 85, in main
        cli = PlaybookGrapherCLI(args)
    TypeError: Can't instantiate abstract class PlaybookGrapherCLI with abstract methods init_parser, post_process_args
    
    
    bug 
    opened by JakobP 4
  • ansible-playbook-grapher fails with different errors in different versions after upgrading from 1.1.2 to 1.2.0

    ansible-playbook-grapher fails with different errors in different versions after upgrading from 1.1.2 to 1.2.0

    Describe the bug

    In this new version ansible-playbook-grapher fails with:

    Failure with latest: 1.2.0
    
    ansible-playbook-grapher -t task_gather_facts --skip-tags omit_from_grapher -e kubeinit_cluster_distro=okd -e kubeinit_cluster_distro_role=kubeinit_openshift kubeinit/playbook.yml --include-role-tasks -o docs/src/static/playbook_task_gather_facts --save-dot-file
    
    Parsing playbook kubeinit/playbook.yml
    Warning: : No inventory was parsed, only implicit localhost is available
    Warning: : Looping on tasks or roles are not supported for the moment. Only the
    task having the loop argument will be added to the graph.
    Warning: : Could not match supplied host pattern, ignoring:
    kubeinit_hypervisors
    Traceback (most recent call last):
      File "/usr/local/lib/python3.8/dist-packages/ansible/template/__init__.py", line 1160, in do_template
        res = j2_concat(rf)
      File "<template>", line 12, in root
      File "/usr/lib/python3/dist-packages/jinja2/runtime.py", line 639, in _fail_with_undefined_error
        raise self._undefined_exception(hint)
    jinja2.exceptions.UndefinedError: 'hostvars' is undefined
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/local/bin/ansible-playbook-grapher", line 8, in <module>
        sys.exit(main())
      File "/usr/local/lib/python3.8/dist-packages/ansibleplaybookgrapher/cli.py", line 269, in main
        cli.run()
      File "/usr/local/lib/python3.8/dist-packages/ansibleplaybookgrapher/cli.py", line 61, in run
        grapher.parse(
      File "/usr/local/lib/python3.8/dist-packages/ansibleplaybookgrapher/graphbuilder.py", line 86, in parse
        playbook_node = parser.parse()
      File "/usr/local/lib/python3.8/dist-packages/ansibleplaybookgrapher/parser.py", line 261, in parse
        self._include_tasks_in_blocks(
      File "/usr/local/lib/python3.8/dist-packages/ansibleplaybookgrapher/parser.py", line 379, in _include_tasks_in_blocks
        block_list, _ = task_or_block.get_block_list(
      File "/usr/local/lib/python3.8/dist-packages/ansible/playbook/role_include.py", line 80, in get_block_list
        ri = RoleInclude.load(self._role_name, play=myplay, variable_manager=variable_manager, loader=loader, collection_list=self.collections)
      File "/usr/local/lib/python3.8/dist-packages/ansible/playbook/role/include.py", line 60, in load
        return ri.load_data(data, variable_manager=variable_manager, loader=loader)
      File "/usr/local/lib/python3.8/dist-packages/ansible/playbook/base.py", line 269, in load_data
        ds = self.preprocess_data(ds)
      File "/usr/local/lib/python3.8/dist-packages/ansible/playbook/role/definition.py", line 95, in preprocess_data
        (role_name, role_path) = self._load_role_path(role_name)
      File "/usr/local/lib/python3.8/dist-packages/ansible/playbook/role/definition.py", line 153, in _load_role_path
        role_name = templar.template(role_name)
      File "/usr/local/lib/python3.8/dist-packages/ansible/template/__init__.py", line 886, in template
        result = self.do_template(
      File "/usr/local/lib/python3.8/dist-packages/ansible/template/__init__.py", line 1199, in do_template
        raise AnsibleUndefinedVariable(e)
    ansible.errors.AnsibleUndefinedVariable: 'hostvars' is undefined
    
    Failure with: 1.1.3
    
    ansible-playbook-grapher -t task_gather_facts --skip-tags omit_from_grapher -e kubeinit_cluster_distro=okd -e kubeinit_cluster_distro_role=kubeinit_openshift kubeinit/playbook.yml --include-role-tasks -o docs/src/static/playbook_task_gather_facts --save-dot-file
    
    Warning: : No inventory was parsed, only implicit localhost is available
    Parsing Play: Perform initial setup on ansible-controller host (localhost) (1) ***
    Warning: : Looping on tasks or roles are not supported for the moment. Only the
    task having the loop argument will be added to the graph.
    Done parsing Play: Perform initial setup on ansible-controller host (localhost) (1) ***
    Warning: : Could not match supplied host pattern, ignoring:
    Parsing Play: Gather facts from the cluster hypervisor hosts (0) ***************
    kubeinit_hypervisors
    Done parsing Play: Gather facts from the cluster hypervisor hosts (0) **********
    Parsing Play: Determine facts needed to prepare all hypervisor hosts (1) *******
    Done parsing Play: Determine facts needed to prepare all hypervisor hosts (1) ***
    Parsing Play: Prepare the infrastructure to deploy service and cluster nodes (0) ***
    Done parsing Play: Prepare the infrastructure to deploy service and cluster nodes (0) ***
    Parsing Play: Run the deployment on the target infrastructure (OpenStack/libvirt hypervisors) (1) ***
    Done parsing Play: Run the deployment on the target infrastructure (OpenStack/libvirt hypervisors) (1) ***
    
    Traceback (most recent call last):
      File "/usr/local/bin/ansible-playbook-grapher", line 8, in <module>
        sys.exit(main())
      File "/usr/local/lib/python3.8/dist-packages/ansibleplaybookgrapher/cli.py", line 249, in main
        cli.run()
      File "/usr/local/lib/python3.8/dist-packages/ansibleplaybookgrapher/cli.py", line 71, in run
        svg_path = renderer.render(
      File "/usr/local/lib/python3.8/dist-packages/ansibleplaybookgrapher/renderer.py", line 114, in render
        self._convert_to_graphviz()
      File "/usr/local/lib/python3.8/dist-packages/ansibleplaybookgrapher/renderer.py", line 391, in _convert_to_graphviz
        self.render_node(
      File "/usr/local/lib/python3.8/dist-packages/ansibleplaybookgrapher/renderer.py", line 153, in render_node
        self.render_block(
      File "/usr/local/lib/python3.8/dist-packages/ansibleplaybookgrapher/renderer.py", line 244, in render_block
        self.render_node(
      File "/usr/local/lib/python3.8/dist-packages/ansibleplaybookgrapher/renderer.py", line 161, in render_node
        self.render_role(
      File "/usr/local/lib/python3.8/dist-packages/ansibleplaybookgrapher/renderer.py", line 295, in render_role
        role_color = ":".join([c[0] for c in colors])
      File "/usr/local/lib/python3.8/dist-packages/ansibleplaybookgrapher/renderer.py", line 295, in <listcomp>
        role_color = ":".join([c[0] for c in colors])
    TypeError: 'NoneType' object is not subscriptable
    

    Adding a pin works as expected: https://github.com/Kubeinit/kubeinit/pull/702

    Do you know what changed that is potentially broken?

    Thanks again! Carlos.

    bug waiting-for-response 
    opened by ccamacho 3
  • chore(deps): bump pyquery from 1.4.3 to 2.0.0

    chore(deps): bump pyquery from 1.4.3 to 2.0.0

    Bumps pyquery from 1.4.3 to 2.0.0.

    Changelog

    Sourced from pyquery's changelog.

    2.0.0 (2022-12-28)

    • Breaking change: inputs starting with "http://" or "https://" like PyQuery("http://example.com") will no longer fetch the contents of the URL. Users desiring the old behavior should switch to PyQuery(url="http://example.com").

    • Add nextUntil method

    • .remove() no longer inserts a space in place of the removed element

    • Fix escaping of top-level element text in .html() output

    • Support (and require) cssselect 1.2+

    • Drop support for python 3.5/3.6

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    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 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)
    dependencies python 
    opened by dependabot[bot] 0
  • chore(deps): update ansible-core requirement from <2.14,>=2.12 to >=2.12,<2.15

    chore(deps): update ansible-core requirement from <2.14,>=2.12 to >=2.12,<2.15

    Updates the requirements on ansible-core to permit the latest version.

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    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 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)
    dependencies python 
    opened by dependabot[bot] 0
  • chore(deps): bump pytest from 7.1.3 to 7.2.0

    chore(deps): bump pytest from 7.1.3 to 7.2.0

    Bumps pytest from 7.1.3 to 7.2.0.

    Release notes

    Sourced from pytest's releases.

    7.2.0

    pytest 7.2.0 (2022-10-23)

    Deprecations

    • #10012: Update pytest.PytestUnhandledCoroutineWarning{.interpreted-text role="class"} to a deprecation; it will raise an error in pytest 8.

    • #10396: pytest no longer depends on the py library. pytest provides a vendored copy of py.error and py.path modules but will use the py library if it is installed. If you need other py.* modules, continue to install the deprecated py library separately, otherwise it can usually be removed as a dependency.

    • #4562: Deprecate configuring hook specs/impls using attributes/marks.

      Instead use :pypytest.hookimpl{.interpreted-text role="func"} and :pypytest.hookspec{.interpreted-text role="func"}. For more details, see the docs <legacy-path-hooks-deprecated>{.interpreted-text role="ref"}.

    • #9886: The functionality for running tests written for nose has been officially deprecated.

      This includes:

      • Plain setup and teardown functions and methods: this might catch users by surprise, as setup() and teardown() are not pytest idioms, but part of the nose support.
      • Setup/teardown using the @​with_setup decorator.

      For more details, consult the deprecation docs <nose-deprecation>{.interpreted-text role="ref"}.

    Features

    • #9897: Added shell-style wildcard support to testpaths.

    Improvements

    • #10218: @pytest.mark.parametrize() (and similar functions) now accepts any Sequence[str] for the argument names, instead of just list[str] and tuple[str, ...].

      (Note that str, which is itself a Sequence[str], is still treated as a comma-delimited name list, as before).

    • #10381: The --no-showlocals flag has been added. This can be passed directly to tests to override --showlocals declared through addopts.

    • #3426: Assertion failures with strings in NFC and NFD forms that normalize to the same string now have a dedicated error message detailing the issue, and their utf-8 representation is expresed instead.

    • #7337: A warning is now emitted if a test function returns something other than [None]{.title-ref}. This prevents a common mistake among beginners that expect that returning a [bool]{.title-ref} (for example [return foo(a, b) == result]{.title-ref}) would cause a test to pass or fail, instead of using [assert]{.title-ref}.

    • #8508: Introduce multiline display for warning matching via :pypytest.warns{.interpreted-text role="func"} and enhance match comparison for :py_pytest._code.ExceptionInfo.match{.interpreted-text role="func"} as returned by :pypytest.raises{.interpreted-text role="func"}.

    • #8646: Improve :pypytest.raises{.interpreted-text role="func"}. Previously passing an empty tuple would give a confusing error. We now raise immediately with a more helpful message.

    • #9741: On Python 3.11, use the standard library's tomllib{.interpreted-text role="mod"} to parse TOML.

      tomli{.interpreted-text role="mod"}` is no longer a dependency on Python 3.11.

    • #9742: Display assertion message without escaped newline characters with -vv.

    • #9823: Improved error message that is shown when no collector is found for a given file.

    ... (truncated)

    Commits
    • 3af3f56 Prepare release version 7.2.0
    • bc2c3b6 Merge pull request #10408 from NateMeyvis/patch-2
    • d84ed48 Merge pull request #10409 from pytest-dev/asottile-patch-1
    • ffe49ac Merge pull request #10396 from pytest-dev/pylib-hax
    • d352098 allow jobs to pass if codecov.io fails
    • c5c562b Fix typos in CONTRIBUTING.rst
    • d543a45 add deprecation changelog for py library vendoring
    • f341a5c Merge pull request #10407 from NateMeyvis/patch-1
    • 1027dc8 [pre-commit.ci] auto fixes from pre-commit.com hooks
    • 6b905ee Add note on tags to CONTRIBUTING.rst
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    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 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)
    dependencies python 
    opened by dependabot[bot] 0
  • [Feature request] Variable mapping option

    [Feature request] Variable mapping option

    I'm looking to document a large playbook and documenting where variables are declared, and where they're used, has been difficult.

    I'd like to see an option to map where variables are defined and where in the playbook they're used. More specifically, if I know I've declared variables in <role-name>/meta/main.yml, I want to tell the grapher to start in <role-name>/meta/main.yml and map to where they are used within that role (or, in other roles).

    waiting-for-response 
    opened by orangecuse44 1
  • Make nodes on SVG file collapsable

    Make nodes on SVG file collapsable

    When running ansible-playbook-grapher --include-role-tasks on a playbook, it would be great if nodes could be collapsable. The graph can become intense and hard to consume.

    feature-request 
    opened by thetopnach 3
Releases(v1.2.0)
  • v1.2.0(Aug 21, 2022)

    What's Changed

    • feat: Add test case for community downloaded roles and collections by @haidaraM in https://github.com/haidaraM/ansible-playbook-grapher/pull/117
    • feat: Add support multiple playbooks in one graph by @haidaraM in https://github.com/haidaraM/ansible-playbook-grapher/pull/118
    • fix: Roles usages and do not use multiple edges for role tasks by @haidaraM in https://github.com/haidaraM/ansible-playbook-grapher/pull/120
    • feat: Add a flag to group roles by name - Revert the old behavior by @haidaraM in https://github.com/haidaraM/ansible-playbook-grapher/pull/122
    • fix: Avoid recursive endless loop when a role references itself by @haidaraM in https://github.com/haidaraM/ansible-playbook-grapher/pull/123

    Full Changelog: https://github.com/haidaraM/ansible-playbook-grapher/compare/v1.1.3...v1.2.0

    Source code(tar.gz)
    Source code(zip)
  • v1.1.3(Jul 17, 2022)

    What's Changed

    • fix: Render a single node when multiple playbooks use the same role by @haidaraM in https://github.com/haidaraM/ansible-playbook-grapher/pull/111
    • fix: Improve the position of the conditions on the edges by @haidaraM in https://github.com/haidaraM/ansible-playbook-grapher/pull/116

    Full Changelog: https://github.com/haidaraM/ansible-playbook-grapher/compare/v1.1.2...v1.1.3

    Source code(tar.gz)
    Source code(zip)
  • v1.1.2(Jun 22, 2022)

    What's Changed

    • refactor(internal): Remove useless EdgeNode by @haidaraM in https://github.com/haidaraM/ansible-playbook-grapher/pull/109
    • chore(deps): bump pytest from 7.1.1 to 7.1.2 by @dependabot in https://github.com/haidaraM/ansible-playbook-grapher/pull/107
    • Forbid incompatible ansible-core versions >= 2.13 by @jheidbrink in https://github.com/haidaraM/ansible-playbook-grapher/pull/114

    New Contributors

    • @jheidbrink made their first contribution in https://github.com/haidaraM/ansible-playbook-grapher/pull/114

    Full Changelog: https://github.com/haidaraM/ansible-playbook-grapher/compare/v1.1.1...v1.1.2

    Source code(tar.gz)
    Source code(zip)
  • v1.1.1(May 16, 2022)

    What's Changed

    • ci: Ansible 2.11.8 and 2.12.2 and ubuntu-latest by @haidaraM in https://github.com/haidaraM/ansible-playbook-grapher/pull/103
    • fix: Properly rank the edges in the graphs and sub-graphs by @haidaraM in https://github.com/haidaraM/ansible-playbook-grapher/pull/104
    • chore(deps): bump pytest from 6.2.5 to 7.0.1 by @dependabot in https://github.com/haidaraM/ansible-playbook-grapher/pull/105
    • chore(deps): bump pytest from 7.0.1 to 7.1.1 by @dependabot in https://github.com/haidaraM/ansible-playbook-grapher/pull/106

    Full Changelog: https://github.com/haidaraM/ansible-playbook-grapher/compare/v1.1.0...v1.1.1

    Source code(tar.gz)
    Source code(zip)
  • v1.1.0(Feb 12, 2022)

    What's Changed

    • fix: Do not pass display as param since it's a singleton + init locale to fix warning
    • feat: Open node file when double-clicking on it from a browser #79
    • fix: Unhighlight the current node when clicking on a new one
    • fix: Use the correct LICENSE GPLv3 #100
    • Add some news messages + fix typo and type hint
    • refactor: format the code with black #102

    Full Changelog: https://github.com/haidaraM/ansible-playbook-grapher/compare/v1.0.2...v1.1.0

    Source code(tar.gz)
    Source code(zip)
  • v1.0.2(Jan 16, 2022)

    What's Changed

    • fix: Fix include_role with loop by @haidaraM in https://github.com/haidaraM/ansible-playbook-grapher/pull/92
    • fix: Fix include_role with loop and list index out of range by @haidaraM in https://github.com/haidaraM/ansible-playbook-grapher/pull/99

    Full Changelog: https://github.com/haidaraM/ansible-playbook-grapher/compare/v1.0.1...v1.0.2

    Source code(tar.gz)
    Source code(zip)
  • v1.0.1(Jan 6, 2022)

  • v1.0.0(Nov 11, 2021)

    • refactor: See #81
      • Completely rewrite the grapher: the parser, the graph and the renderer to graphviz have been split.
      • Hide some ansible internals in the parser.
    • feat:
      • Consider include_role as normal role instead of task #82
      • feat: Curved edge label based on the path #84
      • feat: Add option to automatically view the generated file #88
      • feat: Add support for block #86. They are now visible in the graph.
      • Add support for when on include_role.
      • Only Ansible >= 2.11 is supported. Python >=3.8 is now required #94.
    • fix:
      • front: Refactor the JS part and fix issue when selecting/unselecting nodes
      • front: Do not unhighlight the current selected node when hovering on parent node
      • cli(typo): rename --ouput-file-name to --output-file-name
      • Use the correct tooltip for edges
      • style: Do not use bold style by default and apply color on nodes border
      • Merge when condition with and
      • Explicitly set color luminance to avoid bright colors
      • Reduce Node ID lengths. No need to use the full UUID
      • Make grapher works with graphviz >= 0.18. See #91
    • test:
      • Make test verbose by default with -vv in the args
      • Fix test_install in GitHub Actions which was not using the correct Ansible version.
    • docs:
      • Reformat CHANGELOG.md and README.md
    • Dependencies:
      • bump pytest from 6.2.4 to 6.2.5 #83
      • bump pytest-cov from 2.12.1 to 3.0.0 #90
      • chore(deps): Remove packaging dependency
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0.dev5(Nov 9, 2021)

  • v1.0.0.dev4(Nov 9, 2021)

  • v1.0.0.dev3(Oct 3, 2021)

  • v1.0.0.dev2(Sep 26, 2021)

  • v0.11.1(Jul 28, 2021)

    • Dependencies:
      • Unpin requirements. See #71
      • Bump pytest-cov from 2.11.1 to 2.12.1 #78
      • Bump pytest from 6.2.2 to 6.2.4 #76
      • Upgrade to GitHub-native Dependabot #72
    • Drop support for ansible 2.8. The grapher requires at least ansible 2.9 #74
    • Fix:
      • Correct graph exported display message. See #69
    • CI: Run github actions on pull requests
    Source code(tar.gz)
    Source code(zip)
  • v0.11.0(Feb 14, 2021)

    • Feat:
      • Add type annotations to the source code
      • Add more debug info + improve counter
    • Fix:
      • Attach play to role edge to play_subgraph instead of role one
      • Fix display verbosity
      • Fix pytest warning (remove rootdir from pytest.ini)
      • Fix: Show task name instead of its ID on hover. See issue #57
      • ci: Fix coverage
    • Refactor:
      • Rewriting the grapher, clean code.
      • Generate node IDs from an util function
    • Style: Replace some format by f-string
    • CI: Replace Travis by Github actions (#54)
    • Dependencies:
      • Bump pytest from 6.0.1 to 6.2.2 (PRs #50, #51, #62, #67)
      • Bump pytest-cov from 2.10.0 to 2.11.1 (PRs #49, #65)
      • Bump pyquery from 1.4.1 to 1.4.3 (PRs #58)
      • Bump lxml from 4.5.2 to 4.6.2 (PRs #53, #61)
      • Bump graphviz from 0.14.1 to 0.16 (PRs #52, #64)
      • Bump graphviz from 0.14.1 to 0.16 (PRs #52, #64)
      • Bump packaging from 20.4 to 20.9 (PRs #66)
    Source code(tar.gz)
    Source code(zip)
Owner
Mohamed El Mouctar Haidara
DevOps, Cloud architect, Full Stack Developer
Mohamed El Mouctar Haidara
command line tool for frequent nmigen tasks (generate sources, show design)

nmigen-tool command line tool for frequent nmigen tasks (generate sources, show design) Usage: generate verilog: nmigen generate verilog nmigen_librar

Hans Baier 8 Nov 27, 2022
Ralph is a command-line tool to fetch, extract, convert and push your tracking logs from various storage backends to your LRS or any other compatible storage or database backend.

Ralph is a command-line tool to fetch, extract, convert and push your tracking logs (aka learning events) from various storage backends to your

France Université Numérique 18 Jan 5, 2023
AML Command Transfer. A lightweight tool to transfer any command line to Azure Machine Learning Services

AML Command Transfer (ACT) ACT is a lightweight tool to transfer any command from the local machine to AML or ITP, both of which are Azure Machine Lea

Microsoft 11 Aug 10, 2022
Command Line (CLI) Application to automate creation of tasks in Redmine, issues on Github and the sync process of them.

Task Manager Automation Tool (TMAT) CLI Command Line (CLI) Application to automate creation of tasks in Redmine, issues on Github and the sync process

Tiamat 5 Apr 12, 2022
sync-my-tasks is a CLI tool that copies tasks between apps.

sync-my-tasks Copy tasks between apps Report a Bug · Request a Feature . Ask a Question Table of Contents Table of Contents Getting Started Developmen

William Hutson 2 Dec 14, 2021
Command line tool to keep track of your favorite playlists on YouTube and many other places.

Command line tool to keep track of your favorite playlists on YouTube and many other places.

Wolfgang Popp 144 Jan 5, 2023
A command-line tool to upload local files and pastebin pastes to your mega account, without signing in anywhere

A command-line tool to upload local files and pastebin pastes to your mega account, without signing in anywhere

ADI 4 Nov 17, 2022
Create animated ASCII-art for the command line almost instantly!

clippy Create and play colored ?? ?? ?? or colorless ⬛️ ⬜️ animated, or static, ASCII-art in the command line! clippy can help if you are wanting to;

Connor 10 Jun 26, 2022
A command line tool to query source code from your current Python env

wxc wxc (pronounced "which") allows you to inspect source code in your Python environment from the command line. It is based on the inspect module fro

Clément Robert 13 Nov 8, 2022
Command-line tool to use LNURL with your LND instance

LND LNURL Commandline tool to use LNURL payRequest and withdrawRequest with LND. Usage: Customize config lndlnurl.conf Run python main.py <LNURL> Dock

Djuri Baars 6 Jan 14, 2022
Tidier - a simple command line tool that helps you make your files tidy up

Tidier - a simple command line tool that helps you make your files tidy up

AmirMohammad Hosseini Nasab 8 Aug 16, 2022
A cd command that learns - easily navigate directories from the command line

NAME autojump - a faster way to navigate your filesystem DESCRIPTION autojump is a faster way to navigate your filesystem. It works by maintaining a d

William Ting 14.5k Jan 3, 2023
Ros command - Unifying the ROS command line tools

Unifying the ROS command line tools One impairment to ROS 2 adoption is that all

null 37 Dec 15, 2022
Collection of useful command line utilities and snippets to help you organise your workspace and improve workflow.

Collection of useful command line utilities and snippets to help you organise your workspace and improve workflow.

Dominik Tarnowski 3 Dec 26, 2021
A lightweight Python module and command-line tool for generating NATO APP-6(D) compliant military symbols from both ID codes and natural language names

Python military symbols This is a lightweight Python module, including a command-line script, to generate NATO APP-6(D) compliant military symbol icon

Nick Royer 5 Dec 27, 2022
Python command line tool and python engine to label table fields and fields in data files.

Python command line tool and python engine to label table fields and fields in data files. It could help to find meaningful data in your tables and data files or to find Personal identifable information (PII).

APICrafter 22 Dec 5, 2022
A command line tool to hide and reveal information inside images (works for both PNGs and JPGs)

Imgrerite A command line tool to hide and reveal information inside images (works for both PNGs and JPGs) Dependencies Python 3 Git Most of the Linux

Jigyasu 10 Jul 27, 2022
gget is a free and open-source command-line tool and Python package that enables efficient querying of genomic databases.

gget is a free and open-source command-line tool and Python package that enables efficient querying of genomic databases. gget consists of a collection of separate but interoperable modules, each designed to facilitate one type of database querying in a single line of code.

Pachter Lab 570 Dec 29, 2022