ansigenome | gather information and manage your Ansible roles
kandi X-RAY | ansigenome Summary
kandi X-RAY | ansigenome Summary
A tool to help you gather information and manage your Ansible roles.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Scan the roles
- Create or augment meta file
- Add the main keys to the main key
- Make sure meta_dict is consistent
- Execute the shell command
- Return a dictionary of role names
- Run a shell command
- Exit if there are no roles
- Export the roles
- Check if the stream has colors
- Read a file into a list
- Get the version from a file
- Write config to a file
- Convert yaml into a nice yaml string
ansigenome Key Features
ansigenome Examples and Code Snippets
Community Discussions
Trending Discussions on ansigenome
QUESTION
I've joined a project which has a large number of playbooks and roles, and which makes heavy use of include
(often in a nested fashion) in order to include playbooks/roles within existing playbooks/roles. (Whether this is good or bad practice should be considered out of scope of this question, because it's not something I can immediately change. Note also that include_role
is not used because these playbooks were written well before 2.2 was out, and are still in the process of being updated.)
Normally when running ansible-playbook
, the output just shows each task being run, but it does not show the includes which pull in extra tasks. This makes it hard to how the overall flow jumps around between playbooks. In contrast, include_vars
tasks are included in the output. I'm guessing this is because it's an Ansible module, whereas include
isn't really a module.
So without having to modify the playbooks, is there way to run playbooks which shows the following?
- when
include
directives are triggering, and - (ideally) also the exact files which are being included, since it's not always obvious how relative paths are converted into absolute paths
I've found lots of advice on various ways to debug playbooks, but nothing which achieves this. Bonus points if it also shows when roles are being included via meta
role dependencies!
I'm aware that there are tools such as ansigenome which do static analysis of playbooks, but I'm hoping for something which can output the information at playbook run-time, for any playbook I choose to invoke.
If it's not currently possible, would it be a reasonable feature request?
...ANSWER
Answered 2017-Aug-30 at 19:15Try executing ansible-playbook -vv
, it shows "task path" for every executed task, like this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ansigenome
You can use ansigenome like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page