Closed pvoborni closed 4 years ago
@Tiboris or @netoarmando , let me know if I should merge this.
Fixed also comment in Ansible Inventory as it was incorrectly referencing to Linchpin.
I've also found an issue that the resulting Ansible inventory was not correct. PR updated with fix:
--- a/src/aiohabit/outputs/ansible_inventory.py
+++ b/src/aiohabit/outputs/ansible_inventory.py
@@ -19,7 +19,7 @@ from aiohabit.outputs.utils import is_windows_host, resolve_hostname
from aiohabit.utils import get_config_value, get_host_from_metadata, save_yaml
DEFAULT_INVENTORY_PATH = "aiohabit-inventory.yaml"
-DEFAULT_INVENTORY_LAYOUT = {"all": {"children": [], "hosts": {}}}
+DEFAULT_INVENTORY_LAYOUT = {"all": {"children": {}, "hosts": {}}}
now e.g. ansible -i aiohabit-inventory.yaml -m shell -a "hostname" all
should work
Add Ansible Inventory and pytest-multihost output modules
And enhance "up" action to use them. Add also "output" action which calls them separately. It can be used for recreation of deleted ones or testing.
hosts: adding missing properties
So that they can be work with in output modules.