Rulebook does not work with inventory.ini files
AlexonOliveiraRH opened this issue · 1 comments
AlexonOliveiraRH commented
Rulebook doesn't accept INI files for inventory, only YAML files:
$ ansible-rulebook --rulebook rulebook.yaml -i ./inventory.ini
2023-03-03 17:25:46,595 - ansible_rulebook.cli - ERROR - Unexpected exception
Traceback (most recent call last):
File "/home/localuser/.local/lib/python3.10/site-packages/ansible_rulebook/cli.py", line 203, in main
asyncio.run(app.run(args))
File "/usr/lib64/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib64/python3.10/asyncio/base_events.py", line 649, in run_until_complete
return future.result()
File "/home/localuser/.local/lib/python3.10/site-packages/ansible_rulebook/app.py", line 67, in run
inventory = load_inventory(parsed_args.inventory)
File "/home/localuser/.local/lib/python3.10/site-packages/ansible_rulebook/util.py", line 70, in load_inventory
inventory_data = yaml.safe_load(f.read())
File "/usr/lib64/python3.10/site-packages/yaml/__init__.py", line 125, in safe_load
return load(stream, SafeLoader)
File "/usr/lib64/python3.10/site-packages/yaml/__init__.py", line 81, in load
return loader.get_single_data()
File "/usr/lib64/python3.10/site-packages/yaml/constructor.py", line 49, in get_single_data
node = self.get_single_node()
File "/usr/lib64/python3.10/site-packages/yaml/composer.py", line 39, in get_single_node
if not self.check_event(StreamEndEvent):
File "/usr/lib64/python3.10/site-packages/yaml/parser.py", line 98, in check_event
self.current_event = self.state()
File "/usr/lib64/python3.10/site-packages/yaml/parser.py", line 171, in parse_document_start
raise ParserError(None, None,
yaml.parser.ParserError: expected '<document start>', but found '<scalar>'
in "<unicode string>", line 2, column 1:
fedora.example.local
^
Alex-Izquierdo commented
Duplicated: ansible/ansible-rulebook#241