Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for YAML inventories #154

Open
tomobrien opened this issue Feb 17, 2018 · 4 comments
Open

Support for YAML inventories #154

tomobrien opened this issue Feb 17, 2018 · 4 comments

Comments

@tomobrien
Copy link

It would be great to support the YAML inventory as specified in the docs, http://docs.ansible.com/ansible/devel/plugins/inventory/yaml.html


instances_v3:
children:
webservers_v3:
hosts:
app01:
app02:
app03:
vars:
client: bigcompany
owner: Tom

It almost works. Except vars give "Unsupported vars syntax" and it treats the hostgroups and vars as hosts themselves.

Command:
ansible-cmdb -t txt_table out/ out_rpms/ -i hosts.yml

Output:

Unsupported vars syntax. Skipping line: client: bigcompany
Unsupported vars syntax. Skipping line: owner: Tom
...
--- not reachable
client not reachable
owner not reachable
...

@fboender
Copy link
Owner

fboender commented Mar 3, 2018

I'll look into this. I believe it might be fairly easy to accomplish, maybe. Perhaps. Hopefully ;-)

@oxivanisher
Copy link

Is there any news on this feature?

arnisoph added a commit to arnisoph/ansible-cmdb that referenced this issue Sep 3, 2019
Signed-off-by: Arnold Bechtoldt <arnold.bechtoldt@inovex.de>
@fboender fboender self-assigned this Sep 5, 2021
@fboender
Copy link
Owner

fboender commented Sep 5, 2021

This should be fixed with PR #215. However, that'll take a while to merge, because it's a significant change in how ansible-cmdb works.

It's been a while since I worked on this issue, but I think "fairly easy to accomplish" should still hold true. I'll see if I can implement this sooner and look into merging PR #215 later.

kayodebristol added a commit to kayodebristol/ansible-cmdb that referenced this issue Jan 13, 2023
included pull request parse YAML inventory files with ansible-inventory, refs fboender#154
Signed-off-by: Arnold Bechtoldt <arnold.bechtoldt@inovex.de>
@thexperiments
Copy link

What is the current status on this, would really like to use this great tool but this currently makes it hard for me.

Could this be worked around with some playbook that runs setup and adds the groups as facts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants